Debian Codegraph @

ansible_collections/dellemc/powerflex/roles/powerflex_lia/tasks/install_lia.yml

raw symbols SCIP
1 ---
2 - name: Set facts for MDM counts
3 ansible.builtin.set_fact:
4 powerflex_lia_mdm_count: "{{ groups['mdm'] | length }}"
5
6 - name: Set facts for powerflex_lia_tertiary_ip
7 ansible.builtin.set_fact:
8 powerflex_lia_tertiary_ip: "{{ hostvars[groups['mdm'][2]]['ansible_host'] }}"
9 when: powerflex_lia_mdm_count | int > 2
10
11 - name: Set facts for powerflex_lia_mdm_ips if powerflex_lia_mdm_count is 2
12 ansible.builtin.set_fact:
13 powerflex_lia_mdm_ips: "{{ hostvars[groups['mdm'][0]]['ansible_host'] }},{{ hostvars[groups['mdm'][1]]['ansible_host'] }}"
14 when: powerflex_lia_mdm_count | int == 2
15
16 - name: Set facts for powerflex_lia_mdm_ips if powerflex_lia_mdm_count is more than 2
17 ansible.builtin.set_fact:
18 powerflex_lia_mdm_ips: "{{ hostvars[groups['mdm'][0]]['ansible_host'] }},{{ hostvars[groups['mdm'][1]]['ansible_host'] }},{{ powerflex_lia_tertiary_ip }}"
19 when: powerflex_lia_mdm_count | int > 2
20
21 - name: Include install_powerflex.yml
22 ansible.builtin.include_tasks: ../../powerflex_common/tasks/install_powerflex.yml
23
24 - name: Check if /opt/emc/scaleio/lia/cfg/conf.txt exists
25 ansible.builtin.stat:
26 path: /opt/emc/scaleio/lia/cfg/conf.txt
27 register: powerflex_lia_conf_file_stat
28
29 - name: Update lia_mtls_only
30 ansible.builtin.lineinfile:
31 path: /opt/emc/scaleio/lia/cfg/conf.txt
32 regexp: "^lia_mtls_only=1$"
33 state: absent
34 when: powerflex_lia_conf_file_stat.stat.exists
35
36 - name: Replace lia_token value
37 ansible.builtin.replace:
38 path: /opt/emc/scaleio/lia/cfg/conf.txt
39 regexp: "^lia_token=.*$"
40 replace: "lia_token={{ powerflex_lia_token }}"
41 when: powerflex_lia_conf_file_stat.stat.exists
42 tags:
43 - molecule-idempotence-notest
44
45 - name: PKill LIA for config changes effect
46 ansible.builtin.command: pkill lia
47 register: powerflex_lia_pkill_ouput
48 changed_when: powerflex_lia_pkill_ouput.rc == 0
49 tags:
50 - molecule-idempotence-notest