Übernahme aus privaten Projekt.
This commit is contained in:
36
roles/trixie_migration/tasks/mounttank.yml
Normal file
36
roles/trixie_migration/tasks/mounttank.yml
Normal file
@@ -0,0 +1,36 @@
|
||||
- name: create tank dir
|
||||
become: true
|
||||
file:
|
||||
path: "/tank"
|
||||
state: directory
|
||||
tags: mount
|
||||
when: ansible_facts.lsb.codename == "trixie"
|
||||
|
||||
- name: Installiere nfs-common
|
||||
apt:
|
||||
name:
|
||||
- nfs-common
|
||||
- eza
|
||||
state: present
|
||||
become: true
|
||||
tags: mount
|
||||
when: ansible_facts.lsb.codename == "trixie"
|
||||
|
||||
|
||||
- name: Ensure /tank is mounted
|
||||
become: true
|
||||
ansible.posix.mount:
|
||||
path: /tank
|
||||
src: "{{nas_ip}}:/mnt/md0/public"
|
||||
fstype: "nfs"
|
||||
opts: "defaults"
|
||||
state: mounted
|
||||
tags: mount
|
||||
when: ansible_facts.lsb.codename == "trixie"
|
||||
|
||||
- name: Facts aktualisieren
|
||||
setup:
|
||||
filter: ansible_mounts
|
||||
tags: mount
|
||||
when: ansible_facts.lsb.codename == "trixie"
|
||||
|
||||
Reference in New Issue
Block a user