ユーザ用ツール

サイト用ツール


サイドバー

Index

はじめてのおつかい






DokuWiki整形記法


PlayGround



serverapps:configmgmt:ansible:module:user_module

user - ユーザアカウントを管理する

Synopsis

Manage user accounts and user attributes.

Options

パラメータ必須default選択肢コメント
appendnoyesyes/no
commentno--ユーザのメモ(GECOS)
createhomenoyesyes/noyes:ホームディレクトリを作成
generate_ssh_keynonoyes/noyes:sshキーを作成。存在する場合、上書きしない
nameyes--作成、削除、または変更するユーザ名

Examples

# Add the user 'johnd' with a specific uid and a primary group of 'admin'
- user: name=johnd comment="John Doe" uid=1040 group=admin
 
# Add the user 'james' with a bash shell, appending the group 'admins' and 'developers' to the user's groups
- user: name=james shell=/bin/bash groups=admins,developers append=yes
 
# Remove the user 'johnd'
- user: name=johnd state=absent remove=yes
 
# Create a 2048-bit SSH key for user jsmith in ~jsmith/.ssh/id_rsa
- user: name=jsmith generate_ssh_key=yes ssh_key_bits=2048 ssh_key_file=.ssh/id_rsa
 
# added a consultant whose account you want to expire
- user: name=james18 shell=/bin/zsh groups=developers expires=1422403387

参考

serverapps/configmgmt/ansible/module/user_module.txt · 最終更新: 2017/04/14 14:21 (外部編集)