fix: inventory me staging+production groups, deploy.yml target variable
This commit is contained in:
parent
342280707e
commit
c84e0ee9be
@ -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:
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user