mirror of
https://github.com/transatoshi-mw/grinminer.net.git
synced 2025-10-06 22:02:48 +00:00
added playbooks
This commit is contained in:
38
ansible/nfs-proxmox-install.yml
Normal file
38
ansible/nfs-proxmox-install.yml
Normal file
@@ -0,0 +1,38 @@
|
||||
---
|
||||
- hosts: test
|
||||
remote_user: root
|
||||
tasks:
|
||||
|
||||
- name: Install NFS server
|
||||
ansible.builtin.apt:
|
||||
pkg:
|
||||
- nfs-kernel-server
|
||||
- nfs-common
|
||||
state: latest
|
||||
update_cache: yes
|
||||
|
||||
- name: Create NFS mount
|
||||
ansible.builtin.file:
|
||||
path: /mnt/{{ inventory_hostname_short }}
|
||||
state: directory
|
||||
mode: '0777'
|
||||
group: root
|
||||
|
||||
- name: Chown NFS mount
|
||||
ansible.builtin.shell:
|
||||
cmd: chown root /mnt/{{ inventory_hostname_short }}
|
||||
|
||||
- name: Edit /etc/exports
|
||||
ansible.builtin.lineinfile:
|
||||
path: /etc/exports
|
||||
line: /mnt/{{ inventory_hostname_short }} 10.0.0.0/24(rw,sync,no_subtree_check)
|
||||
|
||||
- name: Exportfs
|
||||
ansible.builtin.shell:
|
||||
cmd: exportfs -a
|
||||
|
||||
- name: Enable NFS server
|
||||
ansible.builtin.service:
|
||||
name: nfs-kernel-server
|
||||
enabled: true
|
||||
state: started
|
Reference in New Issue
Block a user