From ba853696129bdbf4848e153ced29c7ddabdbcd49 Mon Sep 17 00:00:00 2001 From: John-Paul Robinson <jpr@uab.edu> Date: Thu, 24 Oct 2019 16:26:15 -0500 Subject: [PATCH] Add ansible playbook run to user-data script for ood ops There is no call into ood by terraform so trigger it's ops steps via an ansible-playbook during the user-data script. --- ood-instance/main.tf | 1 + 1 file changed, 1 insertion(+) diff --git a/ood-instance/main.tf b/ood-instance/main.tf index 8b6a5d9..a6a4419 100644 --- a/ood-instance/main.tf +++ b/ood-instance/main.tf @@ -34,6 +34,7 @@ resource "openstack_compute_instance_v2" "ood" { - [ bash, -xc, 'ethernet=$(cat /sys/class/net/eth1/address); nodename=$(hostname -s); sed -e "s/MY_HWADDR/$ethernet/" -e "s/MY_NODENAME/$nodename/" -i /warewulf/config;' ] - [ bash, -xc, "until WWGETFILES_INTERVAL=0 bash -x /warewulf/bin/wwgetfiles; do echo waiting ; rm -f /tmp/.wwgetfile.lock ; sleep 10; done;" ] - [ bash, -xc, "systemctl restart munge" ] + - [ bash, -xc, "cd /CRI_XCBC; ansible-playbook -c local -i /CRI_XCBC/hosts -l `hostname -s` /CRI_XCBC/ood-ops.yaml -b -v" ] EOF -- GitLab