This should work
diff --git a/xos/synchronizers/vcpe/steps/sync_vcpetenant_vtn.yaml b/xos/synchronizers/vcpe/steps/sync_vcpetenant_vtn.yaml
index cf56cbe..9fc3f2a 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,14 +71,10 @@
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 {{ hostname.stdout }}'
+ line="127.0.0.1 localhost {{ '{{' }} ansible_hostname {{ '}}' }}"
owner=root group=root mode=0644
- name: Check to see if network is setup