|
3 | 3 | # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) |
4 | 4 |
|
5 | 5 | from __future__ import (absolute_import, division, print_function) |
| 6 | + |
6 | 7 | __metaclass__ = type |
7 | 8 |
|
8 | 9 | import os |
|
19 | 20 | from ansible.utils.collection_loader import set_collection_playbook_paths |
20 | 21 | from ansible.plugins.loader import add_all_plugin_dirs |
21 | 22 |
|
22 | | - |
23 | 23 | display = Display() |
24 | 24 |
|
25 | 25 |
|
@@ -187,12 +187,14 @@ def _process_block(b): |
187 | 187 | display.display(taskmsg) |
188 | 188 |
|
189 | 189 | host = inventory.groups['vpn-host'].hosts[0].name |
190 | | - fact_cache = pbex._variable_manager._nonpersistent_fact_cache[host] |
| 190 | + host_vars = variable_manager.get_vars()['hostvars'][host] |
191 | 191 | return { |
192 | | - 'CA_password': fact_cache['CA_password'], |
193 | | - 'p12_export_password': fact_cache['p12_export_password'], |
194 | | - 'algo_server_name': variable_manager.extra_vars['server_name'], |
195 | | - 'ipv6_support': fact_cache['ipv6_support'], |
196 | | - 'local_service_ip': variable_manager.get_vars()['hostvars'][host]['ansible_lo']['ipv4_secondaries'][0]['address'], |
| 192 | + 'CA_password': host_vars.get('CA_password'), |
| 193 | + 'p12_export_password': host_vars.get('p12_export_password'), |
| 194 | + 'algo_server_name': host_vars.get('server_name'), |
| 195 | + 'ipv6_support': host_vars.get('ipv6_support'), |
| 196 | + 'local_service_ip': host_vars.get('ansible_lo') and |
| 197 | + host_vars.get('ansible_lo').get('ipv4_secondaries') and |
| 198 | + host_vars.get('ansible_lo').get('ipv4_secondaries')[0]['address'], |
197 | 199 | 'ansible_ssh_host': host, |
198 | 200 | } |
0 commit comments