change: inventory to constructed
This commit is contained in:
parent
10ec6af097
commit
e85210c1b0
@ -1,14 +1,13 @@
|
|||||||
env:
|
env_fake:
|
||||||
children:
|
|
||||||
env_fake:
|
|
||||||
vars:
|
|
||||||
ansible_host: localhost
|
|
||||||
ansible_connection: local
|
|
||||||
hosts:
|
hosts:
|
||||||
local:
|
local:
|
||||||
fake-client1-web1:
|
fake-client1-web1:
|
||||||
fake-client1-web2:
|
fake-client1-web2:
|
||||||
fake-client1-db:
|
fake-client1-db:
|
||||||
|
vars:
|
||||||
|
ansible_host: localhost
|
||||||
|
ansible_connection: local
|
||||||
|
environment_name2: fake5
|
||||||
|
|
||||||
roles:
|
roles:
|
||||||
children:
|
children:
|
||||||
@ -16,8 +15,8 @@ roles:
|
|||||||
hosts:
|
hosts:
|
||||||
fake-client1-web1:
|
fake-client1-web1:
|
||||||
fake-client1-web2:
|
fake-client1-web2:
|
||||||
vars:
|
#vars:
|
||||||
ansible_user: root
|
# ansible_user: root
|
||||||
role_db:
|
role_db:
|
||||||
hosts:
|
hosts:
|
||||||
fake-client1-db:
|
fake-client1-db:
|
||||||
|
|||||||
@ -2,16 +2,12 @@
|
|||||||
env_lab:
|
env_lab:
|
||||||
hosts:
|
hosts:
|
||||||
rocky-1:
|
rocky-1:
|
||||||
ansible_host: 192.168.122.129
|
#ansible_host: 192.168.122.129
|
||||||
rocky-2:
|
rocky-2:
|
||||||
ansible_host: 192.168.122.19
|
#ansible_host: 192.168.122.19
|
||||||
vars:
|
vars:
|
||||||
ansible_user: cloud-user
|
ansible_user: cloud-user
|
||||||
|
environment_name2: lab5
|
||||||
# Inject environment
|
|
||||||
env:
|
|
||||||
children:
|
|
||||||
env_lab:
|
|
||||||
|
|
||||||
# Inject roles
|
# Inject roles
|
||||||
roles:
|
roles:
|
||||||
@ -22,6 +18,3 @@ roles:
|
|||||||
role_db:
|
role_db:
|
||||||
hosts:
|
hosts:
|
||||||
rocky-2:
|
rocky-2:
|
||||||
vars:
|
|
||||||
environment_name: lab
|
|
||||||
|
|
||||||
|
|||||||
13
inventories/zz-constructed.yml
Normal file
13
inventories/zz-constructed.yml
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
# inventory.config file in YAML format
|
||||||
|
# Documentation: ansible-doc -t inventory ansible.builtin.constructed
|
||||||
|
#
|
||||||
|
# Reproduce AWX behavior for constructed inventories
|
||||||
|
|
||||||
|
plugin: ansible.builtin.constructed
|
||||||
|
strict: False
|
||||||
|
|
||||||
|
keyed_groups:
|
||||||
|
- prefix: env_
|
||||||
|
key: environment_name
|
||||||
|
parent_group: env
|
||||||
|
|
||||||
Loading…
x
Reference in New Issue
Block a user