Compare commits
No commits in common. "b655bd5540a6f361f40766fc51a2e7868594c62b" and "8c787ac4bca6ffc73b5054bd91b6391151d67274" have entirely different histories.
b655bd5540
...
8c787ac4bc
7 changed files with 1 additions and 103 deletions
|
@ -1,6 +1,2 @@
|
||||||
---
|
---
|
||||||
# handlers file for mount
|
# handlers file for mount
|
||||||
- name: restart autofs
|
|
||||||
service:
|
|
||||||
name: autofs
|
|
||||||
state: restarted
|
|
||||||
|
|
|
@ -1,4 +0,0 @@
|
||||||
- name: test
|
|
||||||
ansible.builtin.file:
|
|
||||||
path: /tmp/ext4-{{item.name}}
|
|
||||||
state: directory
|
|
|
@ -1,20 +1,2 @@
|
||||||
---
|
---
|
||||||
# tasks file for mount
|
# tasks file for mount
|
||||||
|
|
||||||
- name: Set up mounts if variable is defined
|
|
||||||
block:
|
|
||||||
# - include_tasks: ext4.yml
|
|
||||||
# when: mounts.ext4
|
|
||||||
# with_items:
|
|
||||||
# - mounts.ext4
|
|
||||||
|
|
||||||
- include_tasks: nfs.yml
|
|
||||||
when: mounts.nfs is defined
|
|
||||||
vars:
|
|
||||||
nfs_mounts: "{{ mounts.nfs }}"
|
|
||||||
|
|
||||||
# - include_tasks: sshfs.yml
|
|
||||||
# loop: "{{ mounts }}"
|
|
||||||
# when: item == "sshfs"
|
|
||||||
|
|
||||||
when: mounts is defined
|
|
||||||
|
|
|
@ -1,60 +0,0 @@
|
||||||
# tasks file for mounting nfs
|
|
||||||
- name: install autofs
|
|
||||||
ansible.builtin.package:
|
|
||||||
name: autofs
|
|
||||||
state: present
|
|
||||||
update_cache: true
|
|
||||||
|
|
||||||
- name: install nfs-utils
|
|
||||||
ansible.builtin.package:
|
|
||||||
name: nfs-utils
|
|
||||||
state: present
|
|
||||||
|
|
||||||
- name: ensure nfs is in auto.master
|
|
||||||
ansible.builtin.lineinfile:
|
|
||||||
path: /etc/autofs/auto.master
|
|
||||||
line: "/mnt/autofs/nfs /etc/autofs/auto.nfs"
|
|
||||||
state: present
|
|
||||||
create: true
|
|
||||||
notify: restart autofs
|
|
||||||
|
|
||||||
- name: deploy auto.nfs file
|
|
||||||
ansible.builtin.template:
|
|
||||||
src: templates/auto.nfs
|
|
||||||
dest: /etc/autofs/auto.nfs
|
|
||||||
vars:
|
|
||||||
nfs: "{{ nfs_mounts }}"
|
|
||||||
notify: restart autofs
|
|
||||||
|
|
||||||
- name: create symlinks
|
|
||||||
ansible.builtin.file:
|
|
||||||
src: "/mnt/autofs/nfs/{{ item.name }}"
|
|
||||||
dest: "{{ item.local }}"
|
|
||||||
state: link
|
|
||||||
force: true
|
|
||||||
loop: "{{ nfs_mounts }}"
|
|
||||||
|
|
||||||
- name: ensure rpcbind is running
|
|
||||||
service:
|
|
||||||
name: rpcbind
|
|
||||||
state: started
|
|
||||||
enabled: yes
|
|
||||||
|
|
||||||
- name: ensure nfs-client is running
|
|
||||||
service:
|
|
||||||
name: nfs-client.target
|
|
||||||
state: started
|
|
||||||
enabled: yes
|
|
||||||
|
|
||||||
- name: ensure remote-fs is running
|
|
||||||
service:
|
|
||||||
name: remote-fs.target
|
|
||||||
state: started
|
|
||||||
enabled: yes
|
|
||||||
|
|
||||||
- name: ensure autofs is running
|
|
||||||
service:
|
|
||||||
name: autofs
|
|
||||||
state: started
|
|
||||||
enabled: yes
|
|
||||||
|
|
|
@ -1,4 +0,0 @@
|
||||||
- name: test
|
|
||||||
ansible.builtin.file:
|
|
||||||
path: /tmp/sshfs-{{item.name}}
|
|
||||||
state: directory
|
|
|
@ -1,3 +0,0 @@
|
||||||
{% for mount in nfs -%}
|
|
||||||
{{ mount.name }} -rw,soft,intr,rsize=8192,wsize=8192 {{ mount.host }}:{{ mount.remote }}
|
|
||||||
{%- endfor -%}
|
|
|
@ -1,11 +1,2 @@
|
||||||
---
|
---
|
||||||
# vars file for mount on privtorrents.actcur.com
|
# vars file for mount
|
||||||
|
|
||||||
mounts:
|
|
||||||
nfs:
|
|
||||||
- name: deluge
|
|
||||||
host: host.actcur.com
|
|
||||||
remote: /mnt/butter/video/deluge
|
|
||||||
local: /mnt/deluge
|
|
||||||
|
|
||||||
# end of file
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue