add: inventories
This commit is contained in:
parent
d7ac63e391
commit
96711dd9d2
@ -4,4 +4,8 @@
|
|||||||
[defaults]
|
[defaults]
|
||||||
collections_path = ansible_collections/
|
collections_path = ansible_collections/
|
||||||
|
|
||||||
inventory = inventories
|
inventory = inventories
|
||||||
|
|
||||||
|
# For development only
|
||||||
|
# host_key_checking = False
|
||||||
|
|
||||||
|
|||||||
22
inventories/fake/hosts.yml
Normal file
22
inventories/fake/hosts.yml
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
env_fake:
|
||||||
|
vars:
|
||||||
|
ansible_host: localhost
|
||||||
|
ansible_connection: local
|
||||||
|
|
||||||
|
hosts:
|
||||||
|
local:
|
||||||
|
|
||||||
|
children:
|
||||||
|
web:
|
||||||
|
hosts:
|
||||||
|
fake-client1-web1:
|
||||||
|
#ansible_port: 2222
|
||||||
|
fake-client1-web2:
|
||||||
|
vars:
|
||||||
|
ansible_user: root
|
||||||
|
db:
|
||||||
|
hosts:
|
||||||
|
fake-client1-db:
|
||||||
|
#vars:
|
||||||
|
# ansible_become: true
|
||||||
|
# ansible_become_pass: password
|
||||||
@ -1,22 +1,20 @@
|
|||||||
lab:
|
---
|
||||||
vars:
|
env_lab:
|
||||||
ansible_host: localhost
|
|
||||||
ansible_connection: local
|
|
||||||
|
|
||||||
hosts:
|
hosts:
|
||||||
local:
|
rocky-1:
|
||||||
|
ansible_host: 192.168.122.129
|
||||||
|
rocky-2:
|
||||||
|
ansible_host: 192.168.122.19
|
||||||
|
vars:
|
||||||
|
ansible_user: cloud-user
|
||||||
|
all:
|
||||||
children:
|
children:
|
||||||
web:
|
web:
|
||||||
hosts:
|
hosts:
|
||||||
client1-web1:
|
rocky-1:
|
||||||
#ansible_port: 2222
|
|
||||||
client1-web2:
|
|
||||||
vars:
|
|
||||||
ansible_user: root
|
|
||||||
db:
|
db:
|
||||||
hosts:
|
hosts:
|
||||||
client1-db:
|
rocky-2:
|
||||||
#vars:
|
vars:
|
||||||
# ansible_become: true
|
environment_name: lab
|
||||||
# ansible_become_pass: password
|
|
||||||
|
|||||||
@ -10,7 +10,7 @@
|
|||||||
msg: Hello, world!
|
msg: Hello, world!
|
||||||
|
|
||||||
- name: Hello World
|
- name: Hello World
|
||||||
hosts: client1-web1
|
hosts: web
|
||||||
gather_facts: no
|
gather_facts: no
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
@ -19,7 +19,7 @@
|
|||||||
name: activia.infra_common.configure_web
|
name: activia.infra_common.configure_web
|
||||||
|
|
||||||
- name: Hello World
|
- name: Hello World
|
||||||
hosts: client1-db
|
hosts: db
|
||||||
gather_facts: no
|
gather_facts: no
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
@ -35,4 +35,4 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user