tag the nfs/client role so we can easily just run it to make nfs changes.
This commit is contained in:
parent
747ff82f95
commit
5b606d4a19
1 changed files with 22 additions and 0 deletions
|
@ -1,20 +1,28 @@
|
||||||
- name: route config for netapp network
|
- name: route config for netapp network
|
||||||
copy: src=route-eth1.{{ datacenter }} dest=/etc/sysconfig/network-scripts/route-eth1
|
copy: src=route-eth1.{{ datacenter }} dest=/etc/sysconfig/network-scripts/route-eth1
|
||||||
when: datacenter == 'phx2' or datacenter == 'rdu2'
|
when: datacenter == 'phx2' or datacenter == 'rdu2'
|
||||||
|
tags:
|
||||||
|
- nfs/client
|
||||||
|
|
||||||
- name: check for netapp route
|
- name: check for netapp route
|
||||||
command: ip route show
|
command: ip route show
|
||||||
register: netapproute
|
register: netapproute
|
||||||
always_run: yes
|
always_run: yes
|
||||||
changed_when: "1 != 1"
|
changed_when: "1 != 1"
|
||||||
|
tags:
|
||||||
|
- nfs/client
|
||||||
|
|
||||||
- name: run netapp route if needed in phx2
|
- name: run netapp route if needed in phx2
|
||||||
command: /etc/sysconfig/network-scripts/ifup-routes eth1
|
command: /etc/sysconfig/network-scripts/ifup-routes eth1
|
||||||
when: netapproute.stdout.find("10.5.88.0") == -1 and datacenter == 'phx2'
|
when: netapproute.stdout.find("10.5.88.0") == -1 and datacenter == 'phx2'
|
||||||
|
tags:
|
||||||
|
- nfs/client
|
||||||
|
|
||||||
- name: run netapp route if needed in rdu
|
- name: run netapp route if needed in rdu
|
||||||
command: /etc/sysconfig/network-scripts/ifup-routes eth1
|
command: /etc/sysconfig/network-scripts/ifup-routes eth1
|
||||||
when: netapproute.stdout.find("172.31.1.0") == -1 and datacenter == 'rdu'
|
when: netapproute.stdout.find("172.31.1.0") == -1 and datacenter == 'rdu'
|
||||||
|
tags:
|
||||||
|
- nfs/client
|
||||||
|
|
||||||
#
|
#
|
||||||
# Install needed packages
|
# Install needed packages
|
||||||
|
@ -24,6 +32,8 @@
|
||||||
with_items:
|
with_items:
|
||||||
- nfs-utils
|
- nfs-utils
|
||||||
- rpcbind
|
- rpcbind
|
||||||
|
tags:
|
||||||
|
- nfs/client
|
||||||
|
|
||||||
- name: enable nfs-related services and run them (fedora20 only)
|
- name: enable nfs-related services and run them (fedora20 only)
|
||||||
service: name={{ item }} enabled=true state=started
|
service: name={{ item }} enabled=true state=started
|
||||||
|
@ -31,6 +41,8 @@
|
||||||
- rpcbind
|
- rpcbind
|
||||||
- nfs-lock
|
- nfs-lock
|
||||||
when: ansible_distribution == 'Fedora' and ansible_distribution_major_version|int == 20
|
when: ansible_distribution == 'Fedora' and ansible_distribution_major_version|int == 20
|
||||||
|
tags:
|
||||||
|
- nfs/client
|
||||||
|
|
||||||
- name: enable nfs-related services and run them (rhel7)
|
- name: enable nfs-related services and run them (rhel7)
|
||||||
service: name={{ item }} enabled=true state=started
|
service: name={{ item }} enabled=true state=started
|
||||||
|
@ -38,6 +50,8 @@
|
||||||
- rpcbind
|
- rpcbind
|
||||||
- nfs-lock
|
- nfs-lock
|
||||||
when: ansible_distribution == 'RedHat' and ansible_distribution_major_version|int == 7
|
when: ansible_distribution == 'RedHat' and ansible_distribution_major_version|int == 7
|
||||||
|
tags:
|
||||||
|
- nfs/client
|
||||||
|
|
||||||
- name: enable nfs-related services and run them (rhel6)
|
- name: enable nfs-related services and run them (rhel6)
|
||||||
action: service name={{ item }} enabled=true state=started
|
action: service name={{ item }} enabled=true state=started
|
||||||
|
@ -47,6 +61,8 @@
|
||||||
- nfs
|
- nfs
|
||||||
- nfslock
|
- nfslock
|
||||||
when: ansible_distribution == 'RedHat' and ansible_distribution_major_version|int == 6
|
when: ansible_distribution == 'RedHat' and ansible_distribution_major_version|int == 6
|
||||||
|
tags:
|
||||||
|
- nfs/client
|
||||||
|
|
||||||
- name: nfs mount points (phx2)
|
- name: nfs mount points (phx2)
|
||||||
mount: >
|
mount: >
|
||||||
|
@ -58,6 +74,8 @@
|
||||||
dump=0
|
dump=0
|
||||||
state=mounted
|
state=mounted
|
||||||
when: datacenter == 'phx2'
|
when: datacenter == 'phx2'
|
||||||
|
tags:
|
||||||
|
- nfs/client
|
||||||
|
|
||||||
- name: nfs mount points (rdu)
|
- name: nfs mount points (rdu)
|
||||||
mount: >
|
mount: >
|
||||||
|
@ -69,6 +87,8 @@
|
||||||
dump=0
|
dump=0
|
||||||
state=mounted
|
state=mounted
|
||||||
when: datacenter == 'rdu'
|
when: datacenter == 'rdu'
|
||||||
|
tags:
|
||||||
|
- nfs/client
|
||||||
|
|
||||||
- name: nfs mount points (stg)
|
- name: nfs mount points (stg)
|
||||||
mount: >
|
mount: >
|
||||||
|
@ -80,3 +100,5 @@
|
||||||
dump=0
|
dump=0
|
||||||
state=mounted
|
state=mounted
|
||||||
when: datacenter == 'staging'
|
when: datacenter == 'staging'
|
||||||
|
tags:
|
||||||
|
- nfs/client
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue