|
15 | 15 | # to itself. |
16 | 16 | kdump_test_ssh_server_outside: "{{ inventory_hostname }}" |
17 | 17 | kdump_test_ssh_source: "{{ |
18 | | - ansible_env['SSH_CONNECTION'].split()[0] |
19 | | - if 'SSH_CONNECTION' in ansible_env |
| 18 | + ansible_facts['env']['SSH_CONNECTION'].split()[0] |
| 19 | + if 'SSH_CONNECTION' in ansible_facts['env'] |
20 | 20 | else '127.0.0.1' }}" |
21 | 21 |
|
22 | 22 | # this is the address at which the ssh dump server can be reached |
23 | 23 | # from the managed host. Dumps will be uploaded there. |
24 | 24 | kdump_test_ssh_server_inside: >- |
25 | 25 | {{ |
26 | 26 | kdump_test_ssh_source if kdump_test_ssh_source in |
27 | | - hostvars[kdump_test_ssh_server_outside]['ansible_all_ipv4_addresses'] |
28 | | - + hostvars[kdump_test_ssh_server_outside]['ansible_all_ipv6_addresses'] |
| 27 | + hostvars[kdump_test_ssh_server_outside]['ansible_facts']['all_ipv4_addresses'] |
| 28 | + + hostvars[kdump_test_ssh_server_outside]['ansible_facts']['all_ipv6_addresses'] |
29 | 29 | else |
30 | | - hostvars[kdump_test_ssh_server_outside]['ansible_default_ipv4']['address'] |
| 30 | + hostvars[kdump_test_ssh_server_outside]['ansible_facts']['default_ipv4']['address'] |
31 | 31 | }} |
32 | 32 |
|
33 | 33 | # This is the outside address. Ansible will connect to it to |
34 | 34 | # copy the ssh key. |
35 | 35 | kdump_ssh_server: "{{ kdump_test_ssh_server_outside }}" |
36 | 36 | kdump_ssh_user: >- |
37 | | - {{ hostvars[kdump_test_ssh_server_outside]['ansible_user_id'] }} |
| 37 | + {{ hostvars[kdump_test_ssh_server_outside]['ansible_facts']['user_id'] }} |
38 | 38 | kdump_path: /tmp/tests_ssh |
39 | 39 | kdump_target: |
40 | 40 | type: ssh |
|
65 | 65 | debug: |
66 | 66 | msg: Skipping the test on EL 6 when storing logs over ssh to localhost |
67 | 67 | when: |
68 | | - - ansible_distribution in ['CentOS','RedHat'] |
69 | | - - ansible_distribution_major_version == '6' |
| 68 | + - ansible_facts['distribution'] in ['CentOS','RedHat'] |
| 69 | + - ansible_facts['distribution_major_version'] == '6' |
70 | 70 | - kdump_test_ssh_server_outside == inventory_hostname |
71 | 71 |
|
72 | 72 | # The skip is required on EL 6 because mkdumprd on EL 6 does not work when |
73 | 73 | # configuring ssh to localhost |
74 | 74 | - name: Skip the test on EL 6 when control node == managed node |
75 | 75 | meta: end_host |
76 | 76 | when: |
77 | | - - ansible_distribution in ['CentOS','RedHat'] |
78 | | - - ansible_distribution_major_version == '6' |
| 77 | + - ansible_facts['distribution'] in ['CentOS','RedHat'] |
| 78 | + - ansible_facts['distribution_major_version'] == '6' |
79 | 79 | - kdump_test_ssh_server_outside == inventory_hostname |
80 | 80 |
|
81 | 81 | - name: >- |
|
0 commit comments