AWX
This commit is contained in:
24
Ansible/AWX.md
Normal file
24
Ansible/AWX.md
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
# Ansible and AWX
|
||||||
|
|
||||||
|
## Problems when using network modules
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
---
|
||||||
|
|
||||||
|
- 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') }}"
|
||||||
|
```
|
||||||
Reference in New Issue
Block a user