change: inventory to the best practices
This commit is contained in:
parent
18b363ee3b
commit
2486634762
7
inventories/common.yml
Normal file
7
inventories/common.yml
Normal file
@ -0,0 +1,7 @@
|
||||
all:
|
||||
children:
|
||||
env:
|
||||
roles:
|
||||
children:
|
||||
role_web:
|
||||
role_db:
|
||||
@ -1,20 +1,24 @@
|
||||
env_fake:
|
||||
env:
|
||||
children:
|
||||
env_fake:
|
||||
vars:
|
||||
ansible_host: localhost
|
||||
ansible_connection: local
|
||||
|
||||
hosts:
|
||||
local:
|
||||
fake-client1-web1:
|
||||
fake-client1-web2:
|
||||
fake-client1-db:
|
||||
|
||||
roles:
|
||||
children:
|
||||
web:
|
||||
role_web:
|
||||
hosts:
|
||||
fake-client1-web1:
|
||||
#ansible_port: 2222
|
||||
fake-client1-web2:
|
||||
vars:
|
||||
ansible_user: root
|
||||
db:
|
||||
role_db:
|
||||
hosts:
|
||||
fake-client1-db:
|
||||
#vars:
|
||||
|
||||
@ -1,5 +1,7 @@
|
||||
---
|
||||
env_lab:
|
||||
env:
|
||||
children:
|
||||
env_lab:
|
||||
hosts:
|
||||
rocky-1:
|
||||
ansible_host: 192.168.122.129
|
||||
@ -7,12 +9,12 @@ env_lab:
|
||||
ansible_host: 192.168.122.19
|
||||
vars:
|
||||
ansible_user: cloud-user
|
||||
all:
|
||||
roles:
|
||||
children:
|
||||
web:
|
||||
role_web:
|
||||
hosts:
|
||||
rocky-1:
|
||||
db:
|
||||
role_db:
|
||||
hosts:
|
||||
rocky-2:
|
||||
vars:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user