litle fix

This commit is contained in:
vincent 2019-04-16 18:32:06 +02:00
parent a863ec7887
commit 8a93fb3768
2 changed files with 17 additions and 4 deletions

View File

@ -2,4 +2,6 @@
# defaults file for user_config # defaults file for user_config
user: user:
name: vincent name: vincent
user_config_repo: ssh://git@pi2/vincent/conf2.git

View File

@ -3,12 +3,17 @@
- name: clone user repository - name: clone user repository
git: git:
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). 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: "{{ user_config_repo }}" # 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
force: no force: no
update: no update: yes
accept_hostkey: yes accept_hostkey: yes
register: config_download
- debug:
msg: "{{ config_download }}"
- name: pass user shell to zsh - name: pass user shell to zsh
user: user:
@ -21,5 +26,11 @@
shell: stow * shell: stow *
args: args:
chdir: /home/{{user.name}}/conf2 chdir: /home/{{user.name}}/conf2
creates: "/home/{{user.name}}/.zshrc.d/alias" # not required. a filename, when it already exists, this step will B(not) be run. when: config_download.changed == true
- name: apply stow config on root
shell: stow --t /root zsh vim git
args:
chdir: /home/{{user.name}}/conf2
when: config_download.changed == true
become: yes