add mount
This commit is contained in:
@@ -29,6 +29,13 @@
|
|||||||
home: /data
|
home: /data
|
||||||
shell: /bin/bash
|
shell: /bin/bash
|
||||||
|
|
||||||
|
- name: Install nfs Packages
|
||||||
|
apt:
|
||||||
|
name:
|
||||||
|
- nfs-common
|
||||||
|
state: present
|
||||||
|
update_cache: no
|
||||||
|
|
||||||
- name: Install Python Packages
|
- name: Install Python Packages
|
||||||
apt:
|
apt:
|
||||||
name:
|
name:
|
||||||
@@ -50,8 +57,8 @@
|
|||||||
Type=oneshot
|
Type=oneshot
|
||||||
RemainAfterExit=yes
|
RemainAfterExit=yes
|
||||||
WorkingDirectory=/home/grail
|
WorkingDirectory=/home/grail
|
||||||
ExecStart=/usr/bin/docker compose -f docker-compose.yml up -d
|
ExecStart=/usr/bin/docker compose --env-file ./docker-compose.env -f docker-compose.yml up -d
|
||||||
ExecStop=/usr/bin/docker compose -f docker-compose.yml down
|
ExecStop=/usr/bin/docker compose --env-file ./docker-compose.env -f docker-compose.yml down
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
@@ -100,6 +107,15 @@
|
|||||||
creates: /home/grail/qbitorrent
|
creates: /home/grail/qbitorrent
|
||||||
when: not grail_stat.stat.exists or not grail_stat.stat.isdir
|
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
|
- name: Reload systemd daemon
|
||||||
systemd:
|
systemd:
|
||||||
daemon_reload: yes
|
daemon_reload: yes
|
||||||
|
|||||||
Reference in New Issue
Block a user