Ansible_workstation/home.yml

99 lines
1.5 KiB
YAML

---
- name: nas
hosts: nas
become: true
vars_files:
- vars/users.yml
- vars/home.yml
- vars/nas_secrets.yml
- vars/nas.yml
pre_tasks:
- name: Update
apt:
update_cache: true
upgrade: true
roles:
- role: core
- role: ssh
tags:
- ssh
- role: samba_server
tags:
- samba_server
- role: nfs_server
tags:
- nfs_server
- role: nut
tags:
- nut
- role: geerlingguy.docker
tags:
- docker
- role: mpd
tags:
- mpd
- role: minidlna
tags:
- minidlna
tasks:
- name: Include user
include_role:
name: "user"
loop:
- "{{ admin }}"
loop_control:
loop_var: user
tags:
- user
- name: Remove firstboot user
ansible.builtin.user:
name: foo
state: absent
remove: yes
tags:
- user
- name: Set up monitoring server
debug:
msg: Todo
- name: Set up homeassistant
debug:
msg: Todo
#- name: Set up collectd
# include_role:
# name: collectd
- name: backup
hosts: backup
vars_files:
- vars/home.yml
- vars/backup.yml
- vars/backup_secret.yml
tasks:
- name: NFS shares client
include_role:
name: nfs_client
- name: Set up borgmatic
include_role:
name: borgmatic
- name: Set up collectd
include_role:
name: collectd