added playbook to update all hosts at once
This commit is contained in:
31
update.yml
Normal file
31
update.yml
Normal file
@@ -0,0 +1,31 @@
|
||||
---
|
||||
- hosts: all
|
||||
tasks:
|
||||
- name: "update git url"
|
||||
become: yes
|
||||
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
|
||||
command:
|
||||
cmd: "git config pull.rebase false"
|
||||
chdir: "{{ ansible_user_dir }}/dotfiles"
|
||||
# - name: "git pull"
|
||||
# become: yes
|
||||
# command:
|
||||
# cmd: "git pull"
|
||||
# chdir: "{{ ansible_user_dir }}/dotfiles"
|
||||
- name: "add cronjob for ansible"
|
||||
become: yes
|
||||
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: "update ansible-pull once"
|
||||
become: yes
|
||||
command:
|
||||
cmd: 'ansible-pull --vault-password-file=~/.vaultpass -U "https://gitea.mewissen.site/rene/ansible-pull.git" -d "/opt/ansible-pull" -C master'
|
||||
Reference in New Issue
Block a user