Files
Wiki/Ansible/AWX.md
Michael Schlapa d3b9b742b0 AWX
2020-03-18 09:39:34 +01:00

695 B

Ansible and AWX

Problems when using network modules

---

- hosts: any
  vars:
    aci_login: &aci_login
      hostname: '{{ ansible_host }}'
      username: '{{ lookup("env", "ANSIBLE_NET_USERNAME") | default(ansible_user, true) }}'
      password: '{{ lookup("env", "ANSIBLE_NET_PASSWORD") | default(ansible_password, true) }}'
      validate_certs: no
  tasks:
    - name: Query EPGs
      aci_epg:
        <<: *aci_login
        tenant: '{{ tenant_name | default(omit) }}'
        app_profile: '{{ app_profile_name | default(omit) }}'
        bd: '{{ bd_name | default(omit) }}'
        epg: '{{ epg_name | default(omit) }}'
        state: "{{ state | default('query') }}"