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

16 lines
718 B
YAML

#!/usr/bin/env ansible-playbook
# vim:ft=ansible:
- name: assure vault password file
ansible.builtin.copy: src=vaultpass dest="~/ansiblevaultpass" mode="0600"
become: yes
become_user: ansible
- name: install ansible
ansible.builtin.pip: name=ansible<5,ansible-lint state=latest
- name: configure systemd service
ansible.builtin.template: src=ansible-pull.service dest=/etc/systemd/system/ansible-pull.service mode=0644
- name: configure systemd timer
ansible.builtin.template: src=ansible-pull.timer dest=/etc/systemd/system/ansible-pull.timer mode=0644
notify: restart ansiblepull timer
- name: enable timer
ansible.builtin.systemd: daemon_reload=yes name=ansible-pull.timer enabled=yes state=started