ansible/roles/ansible-pull/tasks/main.yml

17 lines
676 B
YAML
Raw Normal View History

2020-10-17 01:00:06 -05:00
#!/usr/bin/env ansible-playbook
# vim:ft=ansible:
- name: assure vault password file
copy: src=vaultpass dest="~/ansiblevaultpass" mode="0600"
2020-10-17 01:00:06 -05:00
become: yes
become_user: ansible
- name: install ansible
pip: name=ansible<5,ansible-lint state=latest
2020-12-04 09:17:08 -06:00
when: ansible_os_family != "Gentoo"
- name: configure systemd service
2021-07-01 12:12:06 -05:00
template: src=ansible-pull.service dest=/etc/systemd/system/ansible-pull.service mode=0644
- name: configure systemd timer
2021-07-01 12:12:06 -05:00
template: src=ansible-pull.timer dest=/etc/systemd/system/ansible-pull.timer mode=0644
notify: restart ansiblepull timer
- name: enable timer
systemd: daemon_reload=yes name=ansible-pull.timer enabled=yes state=started