summaryrefslogtreecommitdiffstats
path: root/playbooks/roles/jump-vm/templates
diff options
context:
space:
mode:
Diffstat (limited to 'playbooks/roles/jump-vm/templates')
-rw-r--r--playbooks/roles/jump-vm/templates/meta-data.j21
-rw-r--r--playbooks/roles/jump-vm/templates/network-config.j214
-rw-r--r--playbooks/roles/jump-vm/templates/user-data.j213
3 files changed, 28 insertions, 0 deletions
diff --git a/playbooks/roles/jump-vm/templates/meta-data.j2 b/playbooks/roles/jump-vm/templates/meta-data.j2
new file mode 100644
index 0000000..b4cc5e8
--- /dev/null
+++ b/playbooks/roles/jump-vm/templates/meta-data.j2
@@ -0,0 +1 @@
+local-hostname: {{ jumphost.name }}
diff --git a/playbooks/roles/jump-vm/templates/network-config.j2 b/playbooks/roles/jump-vm/templates/network-config.j2
new file mode 100644
index 0000000..ceded54
--- /dev/null
+++ b/playbooks/roles/jump-vm/templates/network-config.j2
@@ -0,0 +1,14 @@
+version: 1
+config:
+ - type: physical
+ name: "{{ jumphost.interfaces[idf.net_config[engine.public_network].interface].name }}"
+ mac_address: "{{ jumphost.interfaces[idf.net_config[engine.public_network].interface].mac_address }}"
+ subnets:
+ - type: dhcp
+ - type: physical
+ name: "{{ jumphost.interfaces[idf.net_config[engine.pxe_network].interface].name }}"
+ mac_address: "{{ jumphost.interfaces[idf.net_config[engine.pxe_network].interface].mac_address }}"
+ subnets:
+ - type: static
+ address: "{{ jumphost.interfaces[idf.net_config[engine.pxe_network].interface].address }}"
+ netmask: "{{ idf.net_config[engine.pxe_network].mask }}"
diff --git a/playbooks/roles/jump-vm/templates/user-data.j2 b/playbooks/roles/jump-vm/templates/user-data.j2
new file mode 100644
index 0000000..648f8d1
--- /dev/null
+++ b/playbooks/roles/jump-vm/templates/user-data.j2
@@ -0,0 +1,13 @@
+ #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 ]