diff --git a/deploy/deploy.yml b/deploy/deploy.yml index cef8ee8..b49a8a4 100644 --- a/deploy/deploy.yml +++ b/deploy/deploy.yml @@ -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: diff --git a/deploy/inventory.ini b/deploy/inventory.ini index 55a50cb..f12534b 100644 --- a/deploy/inventory.ini +++ b/deploy/inventory.ini @@ -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