Initial Push of scraped playbooks

This commit is contained in:
janic
2021-12-06 09:45:41 +01:00
parent 8ea7a36196
commit 7aa8e04057
14 changed files with 353 additions and 2 deletions

View 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
...

View File

@@ -0,0 +1,14 @@
---
- name: "Fix DNS"
hosts: rpis
tasks:
- name: "Copy working resolv.conf"
ansible.builtin.copy:
src: /srv/ansible/files/rpis/resolve.conf
dest: /etc/resolv.conf
owner: root
group: root
mode: '0644'
become: True
...