Private Key specified in the task is not taken into consideration when httpapi plugin is enabled
shrsr opened this issue · 2 comments
shrsr commented
Private Key specified in the task is not taken into consideration when httpapi plugin is enabled
akinross commented
Tested with latest code and below playbook and works and works.
---
- name: My playbook
hosts: aci
gather_facts: false
tasks:
- name: Set vars
ansible.builtin.set_fact:
aci_info: &aci_info
private_key: "{{ lookup('file', '<path-to-key>.key') }}"
output_level: debug
- name: Query all tenants
cisco.aci.aci_tenant: &tenant
<<: *aci_info
state: query
below inventory was used
[aci]
apic ansible_host=<IP>
[aci:vars]
ansible_user=<user>
ansible_connection=ansible.netcommon.httpapi
ansible_network_os=cisco.aci.aci
ansible_httpapi_validate_certs=False
ansible_httpapi_use_ssl=True
lhercot commented
The actual issue is when you pass the path directly which is supported in the non-plugin way.
Like:
---
- name: My playbook
hosts: aci
gather_facts: false
tasks:
- name: Set vars
ansible.builtin.set_fact:
aci_info: &aci_info
private_key: "<path-to-key>.key"
output_level: debug
- name: Query all tenants
cisco.aci.aci_tenant: &tenant
<<: *aci_info
state: query