change variable username

This commit is contained in:
vincent 2019-04-11 18:53:38 +02:00
parent 2860763ea0
commit 5638ed308a
2 changed files with 6 additions and 5 deletions

View File

@ -1,4 +1,5 @@
--- ---
# defaults file for user_config # defaults file for user_config
username: vincent user:
name: vincent

View File

@ -2,7 +2,7 @@
# tasks file for user_config # tasks file for user_config
- name: clone user repository - name: clone user repository
git: git:
dest: /home/{{username}}/conf2 # required. The path of where the repository should be checked out. This parameter is required, unless C(clone) is set to C(no). dest: /home/{{user.name}}/conf2 # required. The path of where the repository should be checked out. This parameter is required, unless C(clone) is set to C(no).
repo: ssh://git@pi2/vincent/conf2.git # required. git, SSH, or HTTP(S) protocol address of the git repository. repo: ssh://git@pi2/vincent/conf2.git # required. git, SSH, or HTTP(S) protocol address of the git repository.
clone: yes # not required. If C(no), do not clone the repository if it does not exist locally clone: yes # not required. If C(no), do not clone the repository if it does not exist locally
recursive: yes recursive: yes
@ -12,7 +12,7 @@
- name: pass user shell to zsh - name: pass user shell to zsh
user: user:
name: "{{username}}" # required. Name of the user to create, remove or modify. name: "{{user.name}}" # required. Name of the user to create, remove or modify.
shell: /bin/zsh # not required. Optionally set the user's shell.,On macOS, before version 2.5, the default shell for non-system users was /usr/bin/false. Since 2.5, the default shell for non-system users on macOS is /bin/bash. shell: /bin/zsh # not required. Optionally set the user's shell.,On macOS, before version 2.5, the default shell for non-system users was /usr/bin/false. Since 2.5, the default shell for non-system users on macOS is /bin/bash.
state: present # not required. choices: absent;present. Whether the account should exist or not, taking action if the state is different from what is stated. state: present # not required. choices: absent;present. Whether the account should exist or not, taking action if the state is different from what is stated.
become: yes become: yes
@ -20,6 +20,6 @@
- name: apply stow config - name: apply stow config
shell: stow * shell: stow *
args: args:
chdir: /home/{{username}}/conf2 chdir: /home/{{user.name}}/conf2
creates: "/home/{{username}}/.zshrc.d/alias" # not required. a filename, when it already exists, this step will B(not) be run. creates: "/home/{{user.name}}/.zshrc.d/alias" # not required. a filename, when it already exists, this step will B(not) be run.