tempalte hosts file once the instance is created
parent
ffc07872f4
commit
23c1ec22e4
@ -1,6 +1,5 @@
|
|||||||
[servers]
|
[servers]
|
||||||
;cianhatton@qnap
|
cianhatton@qnap
|
||||||
root@45.33.84.25
|
|
||||||
|
|
||||||
[localhost]
|
[localhost]
|
||||||
localhost ansible_connection=local ansible_python_interpreter=/Users/chatton/checkouts/ansible-homelab/venv/bin/python
|
localhost ansible_connection=local ansible_python_interpreter=/Users/chatton/checkouts/ansible-homelab/venv/bin/python
|
||||||
|
|||||||
@ -0,0 +1,2 @@
|
|||||||
|
[servers]
|
||||||
|
{{linode_user}}@{{linode_ip}}
|
||||||
@ -1,7 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
linode_ip="$(ansible-inventory -i linode.yml --list | jq ._meta.hostvars | jq '."simple-linode"' | jq -r .ipv4[0])"
|
|
||||||
inventory_entry="root@${linode_ip}"
|
|
||||||
echo $inventory_entry
|
|
||||||
|
|
||||||
echo "[servers]" > linodehosts.ini
|
|
||||||
echo "${inventory_entry}" >> linodehosts.ini
|
|
||||||
Loading…
Reference in New Issue