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:
|
vars:
|
||||||
ansible_host: localhost
|
ansible_host: localhost
|
||||||
ansible_connection: local
|
ansible_connection: local
|
||||||
|
|
||||||
hosts:
|
hosts:
|
||||||
local:
|
local:
|
||||||
|
fake-client1-web1:
|
||||||
|
fake-client1-web2:
|
||||||
|
fake-client1-db:
|
||||||
|
|
||||||
|
roles:
|
||||||
children:
|
children:
|
||||||
web:
|
role_web:
|
||||||
hosts:
|
hosts:
|
||||||
fake-client1-web1:
|
fake-client1-web1:
|
||||||
#ansible_port: 2222
|
|
||||||
fake-client1-web2:
|
fake-client1-web2:
|
||||||
vars:
|
vars:
|
||||||
ansible_user: root
|
ansible_user: root
|
||||||
db:
|
role_db:
|
||||||
hosts:
|
hosts:
|
||||||
fake-client1-db:
|
fake-client1-db:
|
||||||
#vars:
|
#vars:
|
||||||
|
|||||||
@ -1,5 +1,7 @@
|
|||||||
---
|
---
|
||||||
env_lab:
|
env:
|
||||||
|
children:
|
||||||
|
env_lab:
|
||||||
hosts:
|
hosts:
|
||||||
rocky-1:
|
rocky-1:
|
||||||
ansible_host: 192.168.122.129
|
ansible_host: 192.168.122.129
|
||||||
@ -7,12 +9,12 @@ env_lab:
|
|||||||
ansible_host: 192.168.122.19
|
ansible_host: 192.168.122.19
|
||||||
vars:
|
vars:
|
||||||
ansible_user: cloud-user
|
ansible_user: cloud-user
|
||||||
all:
|
roles:
|
||||||
children:
|
children:
|
||||||
web:
|
role_web:
|
||||||
hosts:
|
hosts:
|
||||||
rocky-1:
|
rocky-1:
|
||||||
db:
|
role_db:
|
||||||
hosts:
|
hosts:
|
||||||
rocky-2:
|
rocky-2:
|
||||||
vars:
|
vars:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user