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

29 lines
647 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:
- name: Load secrets
ansible.builtin.include_vars:
file: "{{ inventory_dir }}/secrets/{{ inventory_hostname }}.yml"
tags:
- always
2023-02-26 17:16:42 +01:00
post_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-02-17 16:27:56 +01:00
- name: Add repo mount
ansible.posix.mount:
src: 10.23.0.11:/media/big_data/Infra/borg
path: "{{ pool }}"
2023-02-26 17:16:42 +01:00
opts: rw,sync,hard,_netdev
2023-02-17 16:27:56 +01:00
state: mounted
fstype: nfs
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