WIP
This commit is contained in:
31
example/ansible/inventory/groups.yml
Normal file
31
example/ansible/inventory/groups.yml
Normal file
@@ -0,0 +1,31 @@
|
||||
linux:
|
||||
vars:
|
||||
ansible_user: "root"
|
||||
|
||||
debian13:
|
||||
vars:
|
||||
ansible_python_interpreter: "/usr/bin/python3.13"
|
||||
|
||||
ubuntu24:
|
||||
vars:
|
||||
ansible_python_interpreter: "/usr/bin/python3.12"
|
||||
|
||||
waf:
|
||||
hosts:
|
||||
waf1:
|
||||
waf2:
|
||||
waf3:
|
||||
|
||||
mysql:
|
||||
hosts:
|
||||
sql1:
|
||||
|
||||
nfs:
|
||||
hosts:
|
||||
nfs1:
|
||||
|
||||
www:
|
||||
hosts:
|
||||
www1:
|
||||
www2:
|
||||
www3:
|
||||
7
example/ansible/inventory/multipass.sh
Executable file
7
example/ansible/inventory/multipass.sh
Executable file
@@ -0,0 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
multipass list --format=json |jq '{
|
||||
_meta: {hostvars: [.list[] | {(.name): {ansible_host: .ipv4[0]}}] | add},
|
||||
linux: {hosts: [.list[].name]},
|
||||
ubuntu24: {hosts: [.list[].name]},
|
||||
}'
|
||||
Reference in New Issue
Block a user