Initial Push of scraped playbooks
This commit is contained in:
35
playbooks/Netadmin/NetAdmin.yaml
Normal file
35
playbooks/Netadmin/NetAdmin.yaml
Normal file
@@ -0,0 +1,35 @@
|
||||
---
|
||||
- name: "Mount NAS (NetAdmin)"
|
||||
hosts: home
|
||||
|
||||
tasks:
|
||||
- name: "Create Mountpoint (/mnt/NetAdmin)"
|
||||
file:
|
||||
path: /mnt/NetAdmin
|
||||
state: directory
|
||||
become: True
|
||||
- name: "Install & Upgrade NFS (Debian)"
|
||||
package:
|
||||
name: "nfs-common"
|
||||
state: "present"
|
||||
when: ansible_os_family == "Debian"
|
||||
become: True
|
||||
- name: "Install & Upgrade NFS (Arch)"
|
||||
package:
|
||||
name: "nfs-utils"
|
||||
state: "present"
|
||||
when: ansible_os_family == "Arch"
|
||||
become: True
|
||||
- name: "Edit Mountfile (/etc/fstab)"
|
||||
shell: grep -c "^192.168.1.3:/NetAdmin" /etc/fstab || true
|
||||
register: LineInFile
|
||||
- name: "Mount All mount"
|
||||
lineinfile:
|
||||
dest: /etc/fstab
|
||||
line: "192.168.1.3:/NetAdmin /mnt/NetAdmin nfs rw,hard,intr,timeo=14 0 0"
|
||||
when: LineInFile.stdout == "0"
|
||||
become: True
|
||||
- name: "Mount All if needed"
|
||||
shell: mount -a
|
||||
become: True
|
||||
...
|
||||
Reference in New Issue
Block a user