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:
|
## nginx setup on vms:
|
||||||
```bash
|
```bash
|
||||||
./mkinv 127.0.0.1 127.0.0.2
|
./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
|
## doc links
|
||||||
|
|
4
mkinv
4
mkinv
|
@ -1,9 +1,11 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
FILENAME="./inventory.ini"
|
FILENAME="./inventory.ini"
|
||||||
|
A_USER="andrei"
|
||||||
|
A_KEY="$HOME/.ssh/id_ed25519_yatf"
|
||||||
|
|
||||||
counter=0
|
counter=0
|
||||||
echo -n > "$FILENAME"
|
echo -n > "$FILENAME"
|
||||||
for i; do
|
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++))
|
((counter++))
|
||||||
done
|
done
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
---
|
---
|
||||||
- name: Configure nginx
|
- name: Configure nginx
|
||||||
|
become: true
|
||||||
hosts: all
|
hosts: all
|
||||||
vars:
|
vars:
|
||||||
ansible_python_interpreter: /usr/bin/python3
|
ansible_python_interpreter: /usr/bin/python3
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue