diff --git a/README.md b/README.md index 8acf9b5..9dea061 100644 --- a/README.md +++ b/README.md @@ -19,6 +19,8 @@ Manage NFS (client) installation and configuration. * **nfs_cli_pkg_state** : State of new `nfs-client` package(s) [default : `installed`]. * **nfs_cli_conf_path** : Configuration file for `nfs-client` [default : `/etc/default/nfs-common`]. * **nfs_cli_conf_tpl** : Template used to generate the previous config file [default : `etc/default/nfs-common.j2`]. +* **nfs_quota_conf_path** : Configuration file for `quota` (`nfs-client`) [default : `/etc/default/quota`]. +* **nfs_quota_conf_tpl** : Template used to generate the previous config file [default : `etc/default/quota.j2`]. * **nfs_rpc_nfsd** : Port used by the NFS server [default : `2049`]. * **nfs_rpc_nfs_cb** : Port used by RPC callback [default : `32764`]. * **nfs_rpc_statd_bc** : Port used by RPC statd broadcast [default : `32765`]. diff --git a/defaults/main.yml b/defaults/main.yml index 88c542f..cabf264 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -7,6 +7,9 @@ nfs_cli_pkg_state: 'installed' nfs_cli_conf_path: '/etc/default/nfs-common' nfs_cli_conf_tpl: 'etc/default/nfs-common.j2' +nfs_quota_conf_path: '/etc/default/quota' +nfs_quota_conf_tpl: 'etc/default/quota.j2' + # rpcbind nfs_rpc_nfsd: '2049' nfs_rpc_nfs_cb: '32764' diff --git a/tasks/main.yml b/tasks/main.yml index c9b82c9..46ee9af 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -27,6 +27,16 @@ backup: true when: nfs_cli_manage +- name: CONFIG nfs-quota + template: + src: '{{ nfs_quota_conf_tpl }}' + dest: '{{ nfs_quota_conf_path }}' + owner: root + group: root + mode: 0644 + backup: true + when: nfs_cli_manage + - name: CONFIG add rpcbind services blockinfile: state: present diff --git a/templates/etc/default/quota.j2 b/templates/etc/default/quota.j2 new file mode 100644 index 0000000..7882782 --- /dev/null +++ b/templates/etc/default/quota.j2 @@ -0,0 +1,2 @@ +# {{ ansible_managed }} +RPCRQUOTADOPTS="-p {{ nfs_rpc_quotad }}"