2020-10-17 01:00:06 -05:00
|
|
|
#!/usr/bin/env ansible-playbook
|
|
|
|
# vim:ft=ansible:
|
2020-11-08 00:05:48 -06:00
|
|
|
- name: assure vault password file
|
2022-06-16 23:45:29 -05:00
|
|
|
ansible.builtin.copy: src=vaultpass dest="~/ansiblevaultpass" mode="0600"
|
2020-10-17 01:00:06 -05:00
|
|
|
become: yes
|
2020-11-08 00:05:48 -06:00
|
|
|
become_user: ansible
|
|
|
|
- name: install ansible
|
2022-06-16 23:45:29 -05:00
|
|
|
ansible.builtin.pip: name=ansible<5,ansible-lint state=latest
|
2020-11-08 00:05:48 -06:00
|
|
|
- name: configure systemd service
|
2022-06-16 23:45:29 -05:00
|
|
|
ansible.builtin.template: src=ansible-pull.service dest=/etc/systemd/system/ansible-pull.service mode=0644
|
2020-11-08 00:05:48 -06:00
|
|
|
- name: configure systemd timer
|
2022-06-16 23:45:29 -05:00
|
|
|
ansible.builtin.template: src=ansible-pull.timer dest=/etc/systemd/system/ansible-pull.timer mode=0644
|
2020-11-08 00:05:48 -06:00
|
|
|
notify: restart ansiblepull timer
|
|
|
|
- name: enable timer
|
2022-06-16 23:45:29 -05:00
|
|
|
ansible.builtin.systemd: daemon_reload=yes name=ansible-pull.timer enabled=yes state=started
|