Modularize ansible-pull a bit
This commit is contained in:
parent
e2cee3a6fa
commit
1b618daf54
@ -1,5 +1,6 @@
|
||||
#!/usr/bin/ansible-playbook
|
||||
# vim:ft=ansible:
|
||||
ansible_pull_repo: "https://git.9iron.club/salt/ansible"
|
||||
user_username: salt
|
||||
zerotier_network_id: !vault |
|
||||
$ANSIBLE_VAULT;1.1;AES256
|
||||
|
@ -7,7 +7,7 @@ User=ansible
|
||||
Group=ansible
|
||||
Type=oneshot
|
||||
Environment=ANSIBLE_CONFIG=~/ansible-pull-repo/ansible-pull.cfg
|
||||
ExecStart=/usr/local/bin/ansible-pull --accept-host-key -U "https://git.9iron.club/salt/ansible" -d "~/ansible-pull-repo" --vault-password-file "~/ansiblevaultpass" site.yml
|
||||
ExecStart=/usr/local/bin/ansible-pull --accept-host-key -U "{{ ansible_pull_repo }}" -d "~/ansible-pull-repo" --vault-password-file "~/ansiblevaultpass" "{{ ansible_pull_playbook }}"
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
@ -4,8 +4,8 @@ Description=Ansible pull timer
|
||||
|
||||
[Timer]
|
||||
Persistent=true
|
||||
OnBootSec=15min
|
||||
OnUnitActiveSec=4h
|
||||
OnBootSec={{ ansible_pull_boot_delay }}
|
||||
OnUnitActiveSec={{ ansible_pull_frequency }}
|
||||
|
||||
[Install]
|
||||
WantedBy=timers.target
|
||||
|
Loading…
Reference in New Issue
Block a user