add: inventories
This commit is contained in:
parent
d7ac63e391
commit
96711dd9d2
@ -5,3 +5,7 @@
|
||||
collections_path = ansible_collections/
|
||||
|
||||
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:
|
||||
ansible_host: localhost
|
||||
ansible_connection: local
|
||||
|
||||
---
|
||||
env_lab:
|
||||
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:
|
||||
web:
|
||||
hosts:
|
||||
client1-web1:
|
||||
#ansible_port: 2222
|
||||
client1-web2:
|
||||
vars:
|
||||
ansible_user: root
|
||||
hosts:
|
||||
rocky-1:
|
||||
db:
|
||||
hosts:
|
||||
client1-db:
|
||||
#vars:
|
||||
# ansible_become: true
|
||||
# ansible_become_pass: password
|
||||
hosts:
|
||||
rocky-2:
|
||||
vars:
|
||||
environment_name: lab
|
||||
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
msg: Hello, world!
|
||||
|
||||
- name: Hello World
|
||||
hosts: client1-web1
|
||||
hosts: web
|
||||
gather_facts: no
|
||||
|
||||
tasks:
|
||||
@ -19,7 +19,7 @@
|
||||
name: activia.infra_common.configure_web
|
||||
|
||||
- name: Hello World
|
||||
hosts: client1-db
|
||||
hosts: db
|
||||
gather_facts: no
|
||||
|
||||
tasks:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user