some inventory adjustmets
This commit is contained in:
parent
e4bd07fe4a
commit
299b142adc
3 changed files with 5 additions and 2 deletions
|
@ -3,7 +3,7 @@
|
|||
## nginx setup on vms:
|
||||
```bash
|
||||
./mkinv 127.0.0.1 127.0.0.2
|
||||
ansible-playbook nginx_setup.yml -bi ./inventory.ini
|
||||
ansible-playbook nginx_setup.yml -i ./inventory.ini
|
||||
```
|
||||
|
||||
## doc links
|
||||
|
|
4
mkinv
4
mkinv
|
@ -1,9 +1,11 @@
|
|||
#!/usr/bin/env bash
|
||||
FILENAME="./inventory.ini"
|
||||
A_USER="andrei"
|
||||
A_KEY="$HOME/.ssh/id_ed25519_yatf"
|
||||
|
||||
counter=0
|
||||
echo -n > "$FILENAME"
|
||||
for i; do
|
||||
echo "vm$counter ansible_host=$i" >> "$FILENAME"
|
||||
echo "vm$counter ansible_host=$i ansible_user=$A_USER ansible_ssh_private_key_file=$A_KEY" >> "$FILENAME"
|
||||
((counter++))
|
||||
done
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
---
|
||||
- name: Configure nginx
|
||||
become: true
|
||||
hosts: all
|
||||
vars:
|
||||
ansible_python_interpreter: /usr/bin/python3
|
||||
|
|
Loading…
Reference in a new issue