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