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

30 lines
869 B
YAML
Raw Normal View History

#!/usr/bin/ansible-playbook
# vim:ft=ansible:
---
- name: Set up ansible-pull
block:
- name: Copy Ansible password file
copy:
src: ansiblevaultpass
dest: ~/ansiblevaultpass
mode: "0600"
become: yes
become_user: ansible
- name: Template out services
template:
src: "{{ item.src }}"
dest: "{{ item.dest }}"
mode: "{{ item.mode }}"
loop:
- { src: "ansible-pull.service", dest: "/etc/systemd/system/ansible-pull.service", mode: "0644" }
- { src: "ansible-pull.timer", dest: "/etc/systemd/system/ansible-pull.timer", mode: "0644" }
2020-06-17 09:03:47 -05:00
notify: restart ansiblepull timer
- name: Enable timer
systemd:
daemon_reload: yes
name: ansible-pull.timer
enabled: yes
state: started
2020-06-25 02:19:36 -05:00
notify: restart ansiblepull timer
become: yes