machine_setup/ansible/roles/zrepl/tasks/linux.yaml

50 lines
922 B
YAML
Raw Normal View History

2023-02-02 04:14:20 +00:00
- name: Build aur packages
register: buildaur
become_user: "{{ build_user.name }}"
command: "aurutils-sync --no-view {{ item }}"
args:
creates: "/var/cache/pacman/custom/{{ item }}-*.pkg.tar.*"
loop:
- zrepl
- name: Update cache
when: buildaur.changed
pacman:
name: []
state: present
update_cache: true
- name: Install packages
package:
name:
- zrepl
state: present
- name: Create directories
file:
name: "{{ item }}"
state: directory
mode: 0755
owner: root
group: wheel
loop:
- /etc/zrepl
- name: Configure zrepl
template:
src: templates/zrepl.yml.j2
dest: /etc/zrepl/zrepl.yml
mode: 0440
owner: root
group: wheel
validate: "zrepl configcheck --config %s"
notify: "restart zrepl"
2022-10-11 23:52:53 +00:00
- name: Enable services
systemd:
enabled: yes
name: "{{ item }}"
daemon_reload: yes
loop:
- zrepl.service