diff --git a/update.yml b/update.yml index 0da78e8..4555dc2 100644 --- a/update.yml +++ b/update.yml @@ -2,12 +2,14 @@ - hosts: all tasks: - name: "update git url" - become: yes + become: true + become_user: root command: cmd: "git remote set-url origin ssh://git@gitea.mewissen.site:22422/rene/dotfiles.git" chdir: "{{ ansible_user_dir }}/dotfiles" - name: "git default settings" - become: yes + become: true + become_user: root command: cmd: "git config pull.rebase false" chdir: "{{ ansible_user_dir }}/dotfiles" @@ -16,8 +18,18 @@ # command: # cmd: "git pull" # chdir: "{{ ansible_user_dir }}/dotfiles" + - name: "remove cronjob for ansible" + become: no + cron: + name: "ansible provision" + user: "{{ ansible_user_id }}" + job: 'ansible-pull --vault-password-file=~/.vaultpass -U "https://gitea.mewissen.site/rene/ansible-pull.git" -d "/opt/ansible-pull" -C master' + state: present + minute: 0 + hour: 1 - name: "add cronjob for ansible" - become: yes + become: true + become_user: root cron: name: "ansible provision" user: "{{ ansible_user_id }}" @@ -26,6 +38,7 @@ minute: 0 hour: 1 - name: "update ansible-pull once" - become: yes + become: true + become_user: root command: cmd: 'ansible-pull --vault-password-file=~/.vaultpass -U "https://gitea.mewissen.site/rene/ansible-pull.git" -d "/opt/ansible-pull" -C master' \ No newline at end of file