feat: Base rainbowsheep-cloud ansible playbooks and roles
This commit is contained in:
commit
494e748beb
12 changed files with 345 additions and 0 deletions
36
roles/nfs/tasks/main.yml
Normal file
36
roles/nfs/tasks/main.yml
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
---
|
||||
|
||||
- name: Install nfs server
|
||||
ansible.builtin.apt:
|
||||
name: nfs-kernel-server
|
||||
state: present
|
||||
update_cache: yes
|
||||
|
||||
- name: Create /srv/protected export
|
||||
ansible.builtin.file:
|
||||
state: directory
|
||||
path: /srv/protected
|
||||
|
||||
- name: Export /srv/protected
|
||||
ansible.builtin.lineinfile:
|
||||
path: /etc/exports
|
||||
regexp: '^/srv/protected'
|
||||
line: /srv/protected *(rw,sync,sec=krb5p,no_subtree_check)
|
||||
|
||||
- name: Create /srv/vault export
|
||||
ansible.builtin.file:
|
||||
state: directory
|
||||
path: /srv/vault
|
||||
|
||||
- name: Export /srv/vault
|
||||
ansible.builtin.lineinfile:
|
||||
path: /etc/exports
|
||||
regexp: '^/srv/vault'
|
||||
line: /srv/vault *(rw,sync,sec=krb5p:krb5i:krb5,no_subtree_check)
|
||||
|
||||
- name: Enable and start NFS server
|
||||
ansible.builtin.service:
|
||||
name: nfs-kernel-server
|
||||
state: started
|
||||
enabled: yes
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue