1
0
Fork 0

some inventory adjustmets

This commit is contained in:
Von Random 2025-01-03 11:33:57 +02:00
parent e4bd07fe4a
commit 299b142adc
3 changed files with 5 additions and 2 deletions

View file

@ -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
View file

@ -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

View file

@ -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