fix: inventory me staging+production groups, deploy.yml target variable

This commit is contained in:
devops 2026-09-16 13:32:16 +00:00
parent 342280707e
commit c84e0ee9be
2 changed files with 6 additions and 3 deletions

View File

@ -1,7 +1,7 @@
---
# App ko VM par deploy karo. Idempotent hai - baar baar chalao, wahi nateeja.
- name: Deploy demo-app to VM
hosts: app
hosts: "{{ target | default('production') }}"
gather_facts: true
vars:

View File

@ -1,7 +1,10 @@
[app]
[staging]
staging-vm-01 ansible_host=192.168.124.167
[production]
app-vm-01 ansible_host=192.168.124.136
[app:vars]
[all:vars]
ansible_user=deploy
ansible_ssh_private_key_file=/var/jenkins_secrets/deploy_key
ansible_ssh_common_args=-o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null