add mount
This commit is contained in:
@@ -29,6 +29,13 @@
|
||||
home: /data
|
||||
shell: /bin/bash
|
||||
|
||||
- name: Install nfs Packages
|
||||
apt:
|
||||
name:
|
||||
- nfs-common
|
||||
state: present
|
||||
update_cache: no
|
||||
|
||||
- name: Install Python Packages
|
||||
apt:
|
||||
name:
|
||||
@@ -50,8 +57,8 @@
|
||||
Type=oneshot
|
||||
RemainAfterExit=yes
|
||||
WorkingDirectory=/home/grail
|
||||
ExecStart=/usr/bin/docker compose -f docker-compose.yml up -d
|
||||
ExecStop=/usr/bin/docker compose -f docker-compose.yml down
|
||||
ExecStart=/usr/bin/docker compose --env-file ./docker-compose.env -f docker-compose.yml up -d
|
||||
ExecStop=/usr/bin/docker compose --env-file ./docker-compose.env -f docker-compose.yml down
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
@@ -100,6 +107,15 @@
|
||||
creates: /home/grail/qbitorrent
|
||||
when: not grail_stat.stat.exists or not grail_stat.stat.isdir
|
||||
|
||||
- name: Mount NFS share on /data
|
||||
ansible.posix.mount:
|
||||
src: 192.168.0.2:/watari/Shared
|
||||
path: /data
|
||||
opts: rw,async,hard
|
||||
backup: true
|
||||
state: mounted
|
||||
fstype: nfs
|
||||
|
||||
- name: Reload systemd daemon
|
||||
systemd:
|
||||
daemon_reload: yes
|
||||
|
||||
Reference in New Issue
Block a user