diff options
Diffstat (limited to 'playbooks/roles/jump-vm/templates')
-rw-r--r-- | playbooks/roles/jump-vm/templates/network-config.j2 | 2 | ||||
-rw-r--r-- | playbooks/roles/jump-vm/templates/user-data.j2 | 27 |
2 files changed, 16 insertions, 13 deletions
diff --git a/playbooks/roles/jump-vm/templates/network-config.j2 b/playbooks/roles/jump-vm/templates/network-config.j2 index ceded54..8587a10 100644 --- a/playbooks/roles/jump-vm/templates/network-config.j2 +++ b/playbooks/roles/jump-vm/templates/network-config.j2 @@ -1,3 +1,4 @@ +{% if deployment_type == 'full' %} version: 1 config: - type: physical @@ -12,3 +13,4 @@ config: - type: static address: "{{ jumphost.interfaces[idf.net_config[engine.pxe_network].interface].address }}" netmask: "{{ idf.net_config[engine.pxe_network].mask }}" +{% endif %} diff --git a/playbooks/roles/jump-vm/templates/user-data.j2 b/playbooks/roles/jump-vm/templates/user-data.j2 index 648f8d1..2fad2e3 100644 --- a/playbooks/roles/jump-vm/templates/user-data.j2 +++ b/playbooks/roles/jump-vm/templates/user-data.j2 @@ -1,13 +1,14 @@ - #cloud-config - users: - - name: ubuntu - ssh-authorized-keys: - - {{ lookup('file', pub_key ) }} - sudo: ['ALL=(ALL) NOPASSWD:ALL'] - groups: sudo - shell: /bin/bash - runcmd: - # this is requried in labs where the PXE network is different from - # the public network. Without internet connectivity, the installation - # of BMRA fails - - [ iptables, -t, nat, -A, POSTROUTING, -o, ens3, -j, MASQUERADE ] +#jinja2:lstrip_blocks: True +#cloud-config +users: + - name: {{ lookup('env', 'USERNAME') }} + ssh-authorized-keys: + - {{ lookup('file', pub_key ) }} + sudo: ['ALL=(ALL) NOPASSWD:ALL'] + groups: sudo + shell: /bin/bash +runcmd: + # this is requried in labs where the PXE network is different from + # the public network. Without internet connectivity, the installation + # of BMRA fails + - [ iptables, -t, nat, -A, POSTROUTING, -o, ens3, -j, MASQUERADE ] |