summaryrefslogtreecommitdiffstats
path: root/playbooks/roles/jump-vm/templates/user-data.j2
diff options
context:
space:
mode:
authorMichael S. Pedersen <michaelx.pedersen@intel.com>2020-10-23 12:24:43 +0000
committerRihab Banday <rihab.banday@ericsson.com>2020-11-13 16:24:54 +0000
commit5d28b70edce08ee912c433386599424f8202f303 (patch)
tree98c1246797f5a03f9417d6e1e6843f5bd90e8e09 /playbooks/roles/jump-vm/templates/user-data.j2
parente34b4d93d5e288bdbb5ec798602ea5e8f1bc3985 (diff)
Add support for deploying to Equinix Metal bare-metal servers
Adds an additional hw_config which is simplified (equinix-metal). Adds support for skipping HW provisioning (pre-provisioned through EM). Usage: deploy.sh [k8s] Adds a few new helper functions, and updates existing to support changes. Signed-off-by: Michael S. Pedersen <michaelx.pedersen@intel.com> Signed-off-by: Victor Morales <v.morales@samsung.com> Change-Id: I2f84c662d183ba224e0edd8a218abe8b46c1fe45 Signed-off-by: Victor Morales <v.morales@samsung.com> Reviewed-on: https://gerrit.opnfv.org/gerrit/c/kuberef/+/71301 Tested-by: jenkins-ci <jenkins-opnfv-ci@opnfv.org> Reviewed-by: Rihab Banday <rihab.banday@ericsson.com> Reviewed-by: Victor Morales <chipahuac@hotmail.com>
Diffstat (limited to 'playbooks/roles/jump-vm/templates/user-data.j2')
-rw-r--r--playbooks/roles/jump-vm/templates/user-data.j227
1 files changed, 14 insertions, 13 deletions
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 ]