|
51 | 51 | package:
|
52 | 52 | name: iputils-arping
|
53 | 53 | state: present
|
54 |
| - when: ansible_distribution in scale_ubuntu_distribution and ansible_fqdn in scale_protocol_node_list |
| 54 | + when: (ansible_distribution in scale_ubuntu_distribution) and |
| 55 | + (ansible_fqdn in scale_protocol_node_list or inventory_hostname in scale_protocol_node_list) |
55 | 56 |
|
56 | 57 | - name: configure | Check if SMB is running
|
57 | 58 | shell:
|
58 | 59 | cmd: "{{ scale_command_path }}mmces service list|grep SMB"
|
59 | 60 | register: scale_service_status
|
60 |
| - when: ansible_fqdn in scale_protocol_node_list |
| 61 | + when: (ansible_fqdn in scale_protocol_node_list) or |
| 62 | + (inventory_hostname in scale_protocol_node_list) |
61 | 63 | ignore_errors: true
|
62 | 64 | failed_when: false
|
63 | 65 | run_once: true
|
64 | 66 |
|
65 | 67 | - name: configure | Add SMB service to list
|
66 | 68 | set_fact:
|
67 | 69 | scale_service_list: "{{ scale_service_list + [scale_service_status.stderr|regex_search('SMB')] }}"
|
68 |
| - when: ansible_fqdn in scale_protocol_node_list and scale_service_status.rc > 0 |
| 70 | + when: (ansible_fqdn in scale_protocol_node_list or inventory_hostname in scale_protocol_node_list) and |
| 71 | + ( scale_service_status.rc > 0 ) |
69 | 72 | run_once: true
|
70 | 73 |
|
71 | 74 | - name: configure | Add SMB service to list
|
72 | 75 | set_fact:
|
73 | 76 | scale_service_list: "{{ scale_service_list + ['SMB'] }}"
|
74 |
| - when: ansible_fqdn in scale_protocol_node_list and scale_service_status.rc == 0 |
| 77 | + when: (ansible_fqdn in scale_protocol_node_list or inventory_hostname in scale_protocol_node_list) and |
| 78 | + ( scale_service_status.rc == 0 ) |
75 | 79 | run_once: true
|
76 | 80 |
|
77 | 81 | - name: configure | Check if NFS is running
|
78 | 82 | shell:
|
79 | 83 | cmd: "{{ scale_command_path }}mmces service list|grep NFS"
|
80 | 84 | register: scale_service_status
|
81 |
| - when: ansible_fqdn in scale_protocol_node_list |
| 85 | + when: (ansible_fqdn in scale_protocol_node_list) or |
| 86 | + (inventory_hostname in scale_protocol_node_list) |
82 | 87 | ignore_errors: true
|
83 | 88 | failed_when: false
|
84 | 89 | run_once: true
|
85 | 90 |
|
86 | 91 | - name: configure | Add NFS service to the list
|
87 | 92 | set_fact:
|
88 | 93 | scale_service_list: "{{ scale_service_list + [scale_service_status.stderr|regex_search('NFS')] }}"
|
89 |
| - when: ansible_fqdn in scale_protocol_node_list and scale_service_status.rc > 0 |
| 94 | + when: (ansible_fqdn in scale_protocol_node_list or inventory_hostname in scale_protocol_node_list) and |
| 95 | + ( scale_service_status.rc > 0 ) |
90 | 96 | run_once: true
|
91 | 97 |
|
92 | 98 | - name: configure | Add NFS service to the list
|
93 | 99 | set_fact:
|
94 | 100 | scale_service_list: "{{ scale_service_list + ['NFS'] }}"
|
95 |
| - when: ansible_fqdn in scale_protocol_node_list and scale_service_status.rc == 0 |
| 101 | + when: (ansible_fqdn in scale_protocol_node_list or inventory_hostname in scale_protocol_node_list) and |
| 102 | + ( scale_service_status.rc == 0 ) |
96 | 103 | run_once: true
|
97 | 104 |
|
98 | 105 | - import_role:
|
|
185 | 192 |
|
186 | 193 | - name: configure | Assign export ips as pool for CES groups
|
187 | 194 | command: "{{ scale_command_path }}mmces address add --ces-ip {{ item.export_ip_pool|join(',') }} --ces-group {{ item.group_name}}"
|
188 |
| - when: ansible_fqdn in scale_protocol_node_list |
| 195 | + when: (ansible_fqdn in scale_protocol_node_list) or |
| 196 | + (inventory_hostname in scale_protocol_node_list) |
189 | 197 | delegate_to: "{{ scale_protocol_node_list.0 }}"
|
190 | 198 | with_items:
|
191 | 199 | - "{{ scale_protocols.scale_ces_groups }}"
|
|
0 commit comments