diff options
author | Egor Tensin <egor@tensin.name> | 2024-12-17 05:38:20 +0100 |
---|---|---|
committer | Egor Tensin <egor@tensin.name> | 2024-12-17 05:48:46 +0100 |
commit | ce73aab536e5cf3b91a2305e2f292627d157892b (patch) | |
tree | 8cbce44c71f7094db4dfb724e10d8d59fa31c1bd /roles/nfs/tasks/main.yml | |
parent | v4.1.0 (diff) | |
download | infra-ansible-ce73aab536e5cf3b91a2305e2f292627d157892b.tar.gz infra-ansible-ce73aab536e5cf3b91a2305e2f292627d157892b.zip |
add nfs role
Diffstat (limited to 'roles/nfs/tasks/main.yml')
-rw-r--r-- | roles/nfs/tasks/main.yml | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/roles/nfs/tasks/main.yml b/roles/nfs/tasks/main.yml new file mode 100644 index 0000000..f8045e3 --- /dev/null +++ b/roles/nfs/tasks/main.yml @@ -0,0 +1,26 @@ +- name: Install NFS + become: true + ansible.builtin.package: + name: nfs-server + state: present + +- name: Enable & start NFS service + become: true + ansible.builtin.systemd_service: + name: nfs-server + enabled: true + state: started + +- name: Collect required info + ansible.builtin.setup: + gather_subset: [user] + +- name: Configure NFS + become: true + ansible.builtin.template: + src: exports.j2 + dest: /etc/exports + owner: root + group: root + mode: '644' + notify: nfs_configured |