|
236 | 236 | line: 'listeners=PLAINTEXT://0.0.0.0:9092'
|
237 | 237 | when: not update_module
|
238 | 238 |
|
239 |
| -- name: Include advertised listener for the Kafka Socket Server Settings |
| 239 | +- name: Include advertised listener for the Kafka Socket Server Settings (IWL) |
240 | 240 | lineinfile:
|
241 | 241 | path: /opt/kafka/config/server.properties
|
242 | 242 | regexp: '#advertised.listeners=PLAINTEXT://your.host.name:9092'
|
243 | 243 | line: "advertised.listeners=PLAINTEXT://{{ansible_host}}:9092"
|
244 |
| - when: not update_module |
| 244 | + when: not update_module and site == "iwl" |
| 245 | + |
| 246 | +- name: Include advertised listener for the Kafka Socket Server Settings (Spain) |
| 247 | + lineinfile: |
| 248 | + path: /opt/kafka/config/server.properties |
| 249 | + regexp: '#advertised.listeners=PLAINTEXT://your.host.name:9092' |
| 250 | + line: "advertised.listeners=PLAINTEXT://kafka.spain.iwl:9092" |
| 251 | + when: not update_module and site == "spain" |
| 252 | + |
| 253 | +- name: Include advertised listener for the Kafka Socket Server Settings (Italy) |
| 254 | + lineinfile: |
| 255 | + path: /opt/kafka/config/server.properties |
| 256 | + regexp: '#advertised.listeners=PLAINTEXT://your.host.name:9092' |
| 257 | + line: "advertised.listeners=PLAINTEXT://kafka-polito:9092" |
| 258 | + when: not update_module and site == "italy" |
| 259 | + |
| 260 | +- name: Include advertised listener for the Kafka Socket Server Settings (France) |
| 261 | + lineinfile: |
| 262 | + path: /opt/kafka/config/server.properties |
| 263 | + regexp: '#advertised.listeners=PLAINTEXT://your.host.name:9092' |
| 264 | + line: "advertised.listeners=PLAINTEXT://kafka.france.iwl:9092" |
| 265 | + when: not update_module and site == "france" |
| 266 | + |
| 267 | +- name: Include advertised listener for the Kafka Socket Server Settings (Greece) |
| 268 | + lineinfile: |
| 269 | + path: /opt/kafka/config/server.properties |
| 270 | + regexp: '#advertised.listeners=PLAINTEXT://your.host.name:9092' |
| 271 | + line: "advertised.listeners=PLAINTEXT://kafka.greece.iwl:9092" |
| 272 | + when: not update_module and site == "greece" |
245 | 273 |
|
246 | 274 | #- name: Remove Kafka logs
|
247 | 275 | # file:
|
|
277 | 305 | insertafter: EOF
|
278 | 306 | when: not update_module
|
279 | 307 |
|
| 308 | +- name: Change /etc/hosts in IWL (Spain) |
| 309 | + lineinfile: |
| 310 | + path: /etc/hosts |
| 311 | + line: "{{spanish_vpn_ip}} kafka.spain.iwl" |
| 312 | + insertafter: EOF |
| 313 | + when: not update_module and site == "iwl" |
| 314 | + |
| 315 | +- name: Change /etc/hosts in IWL (Italy) |
| 316 | + lineinfile: |
| 317 | + path: /etc/hosts |
| 318 | + line: "{{italian_vpn_ip}} kafka-polito" |
| 319 | + insertafter: EOF |
| 320 | + when: not update_module and site == "iwl" |
| 321 | + |
| 322 | +- name: Change /etc/hosts in IWL (France) |
| 323 | + lineinfile: |
| 324 | + path: /etc/hosts |
| 325 | + line: "{{french_vpn_ip}} kafka.france.iwl" |
| 326 | + insertafter: EOF |
| 327 | + when: not update_module and site == "iwl" |
| 328 | + |
| 329 | +- name: Change /etc/hosts in IWL (Greece) |
| 330 | + lineinfile: |
| 331 | + path: /etc/hosts |
| 332 | + line: "{{greek_vpn_ip}} kafka.greece.iwl" |
| 333 | + insertafter: EOF |
| 334 | + when: not update_module and site == "iwl" |
| 335 | + |
| 336 | +- name: Change /etc/hosts in site broker (Spain) |
| 337 | + lineinfile: |
| 338 | + path: /etc/hosts |
| 339 | + line: "{{ansible_host}} kafka.spain.iwl" |
| 340 | + insertafter: EOF |
| 341 | + when: not update_module and site == "spain" |
| 342 | + |
| 343 | +- name: Change /etc/hosts in site broker (Italy) |
| 344 | + lineinfile: |
| 345 | + path: /etc/hosts |
| 346 | + line: "{{ansible_host}} kafka-polito" |
| 347 | + insertafter: EOF |
| 348 | + when: not update_module and site == "italy" |
| 349 | + |
| 350 | +- name: Change /etc/hosts in site broker (France) |
| 351 | + lineinfile: |
| 352 | + path: /etc/hosts |
| 353 | + line: "{{ansible_host}} kafka.france.iwl" |
| 354 | + insertafter: EOF |
| 355 | + when: not update_module and site == "france" |
| 356 | + |
| 357 | +- name: Change /etc/hosts in site broker (Greece) |
| 358 | + lineinfile: |
| 359 | + path: /etc/hosts |
| 360 | + line: "{{ansible_host}} kafka.greece.iwl" |
| 361 | + insertafter: EOF |
| 362 | + when: not update_module and site == "greece" |
| 363 | + |
280 | 364 | - name: Check if /etc/sudoers file has been modified previously
|
281 | 365 | shell: cat /etc/sudoers | grep "{{ansible_user}}" | grep NOPASSWD | wc -w
|
282 | 366 | register: etc_sudoers_check
|
|
0 commit comments