Forgot about double templating
diff --git a/xos/synchronizers/vcpe/steps/sync_vcpetenant_vtn.yaml b/xos/synchronizers/vcpe/steps/sync_vcpetenant_vtn.yaml
index 4c6dcdb..cf56cbe 100644
--- a/xos/synchronizers/vcpe/steps/sync_vcpetenant_vtn.yaml
+++ b/xos/synchronizers/vcpe/steps/sync_vcpetenant_vtn.yaml
@@ -1,6 +1,6 @@
---
- hosts: {{ instance_name }}
- #gather_facts: False
+ gather_facts: False
connection: ssh
user: ubuntu
sudo: yes
@@ -71,10 +71,14 @@
tasks:
+ - name: Get hostname
+ shell: hostname
+ register: hostname
+
- name: Add hostname to /etc/hosts
lineinfile: dest=/etc/hosts
regexp='^127\.0\.0\.1'
- line='127.0.0.1 localhost {{ ansible_hostname }}'
+ line='127.0.0.1 localhost {{ hostname.stdout }}'
owner=root group=root mode=0644
- name: Check to see if network is setup