Skip to content
Snippets Groups Projects
Commit 0f4892ce authored by Shahaan Ayyub's avatar Shahaan Ayyub
Browse files

Merge pull request #20 from CVL-GitHub/master

Change NFS client tasks to more dynamic and flexible features
parents c8caff82 36770705
No related branches found
No related tags found
No related merge requests found
---
nfs_server: "nfsserver.edu"
nfs_type: "nfs"
nfs_options: "vers=3,noatime,rsize=16384,wsize=16384,hard,intr,tcp,nolock"
---
- name: restart authentication
shell: authconfig --updateall
when: nfs_type == "nfs4"
sudo: true
- name: restart idmap
service: name={{ item }} state=restarted
with_items:
- rpcbind
- rpcidmapd
when: nfs_type == "nfs4"
sudo: true
---
dependencies:
- {role: nfs-common }
---
-
mount: "name={{ item.0 }} src={{ nfs_server }}:{{ item.1 }} fstype=nfs opts=vers=3,noatime,rsize=16384,wsize=16384,hard,intr,tcp,nolock state=mounted"
mount: "name={{ item.0 }} src={{ nfs_server }}:{{ item.1 }} fstype={{ nfs_type }} opts={{ nfs_options }} state=mounted"
name: "Mounting NFS mounts"
with_together:
- destDir
- srcDir
notify: "restart authentication"
notify: "restart idmap"
sudo: true
......@@ -5,3 +5,4 @@
- bind-utils
- nfs-utils
yum: "name={{ item }} state=latest"
sudo: true
---
dependencies:
- {role: nfs-common }
......@@ -14,5 +14,4 @@ ldapCaCertFileSource: "/etc/openldap/certs"
cacertFile: "ca.pem"
ldapRfc2307: ""
ldapRfc2307Pam: ""
ldapServerHost: "10.0.0.1 ldapserver.com"
---
- name: restart sssd
service: name=sssd state=restarted
- name: auth config
shell: authconfig --updateall
sudo: true
- name: restart sssd
service: name=sssd state=restarted
sudo: true
......@@ -16,9 +16,7 @@
sudo: true
- name: "Insert LDAP IP address LDAP to /etc/hosts"
lineinfile: dest=/etc/hosts line='130.220.209.234 m2-w.massive.org.au' state=present insertafter=EOF
# lineinfile: dest=/etc/hosts regexp=^130.220.209.234 line=130.220.209.234 m2-w.massive.org.au state=present insertafter=EOF
# lineinfile: dest=/etc/hosts regexp=^130.220.209.234 line=130.220.209.234 m2-w.massive.org.au state=present
lineinfile: dest=/etc/hosts line="{{ ldapServerHost }}" state=present insertafter=EOF
sudo: true
- name: "Copy ldap.conf file "
......@@ -26,12 +24,12 @@
sudo: true
- name: "Copy ldap cacert file"
copy: src={{ ldapCaCertFileSource }}/cacert.pem dest=/etc/openldap/certs/cacert.pem owner=root group=root mode=0644
copy: src={{ ldapCaCertFileSource }} dest={{ tlsCaCertFile }} owner=root group=root mode=0644
sudo: true
- name: "Copy sssd.conf to ldap client"
template: src=sssd.j2 dest=/etc/sssd/sssd.conf owner=root group=root mode=600
sudo: true
notify: restart sssd
notify: auth config
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment