ansible-borg-server-playbook/playbooks/install.yml

31 lines
650 B
YAML
Raw Normal View History

2023-02-17 14:29:25 +01:00
---
2023-02-17 16:27:56 +01:00
- name: Ansible-borg-server-playbook
2023-02-17 14:29:25 +01:00
hosts: nodes
pre_tasks:
2023-02-17 16:27:56 +01:00
- name: Install nfs-common
ansible.builtin.package:
name: nfs-common
2023-02-26 17:16:42 +01:00
tags:
- mount
2023-06-21 13:37:02 +02:00
2023-02-17 16:27:56 +01:00
- name: Add repo mount
2023-06-21 13:37:02 +02:00
ansible.builtin.template:
src: "mnt-borg.{{ item }}.j2"
dest: "/etc/systemd/system/{{ service_name }}.{{ item }}"
tags:
- mount
loop:
- automount
- mount
- name: Enable automount
ansible.builtin.systemd:
name: "{{ service_name }}.automount"
state: started
enabled: true
2023-02-26 17:16:42 +01:00
tags:
- mount
2023-02-17 14:29:25 +01:00
2023-02-17 16:27:56 +01:00
roles:
- role: ansible-borg-server-role