From 41dc0ffba7c09220626c8397589871063495c0f2 Mon Sep 17 00:00:00 2001 From: Victor Morales Date: Wed, 11 Nov 2020 20:52:09 -0500 Subject: [PATCH] Fix linting issues This change fixes some linting issues accumulated from previous patchsets and ignored by the CI jobs. Signed-off-by: Victor Morales Change-Id: I0bf2e67aee786505e9c01570d4d8d99df62b1f9f Reviewed-on: https://gerrit.opnfv.org/gerrit/c/kuberef/+/71377 Tested-by: jenkins-ci Tested-by: Georg Kunz Reviewed-by: Georg Kunz Reviewed-by: Michael Pedersen --- .gitlab-ci.yml | 1 + .rstcheck.cfg | 3 +++ functions.sh | 19 +++++++++---------- playbooks/roles/bmra-config/tasks/main.yaml | 1 + 4 files changed, 14 insertions(+), 10 deletions(-) create mode 100644 .rstcheck.cfg diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e502b35..fecf145 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,3 +1,4 @@ +--- # GitLab CI config file to deploy RI2 on baremetal infra # and run RC2 compliance tests on the deployed platform. # TODO add tox jobs diff --git a/.rstcheck.cfg b/.rstcheck.cfg new file mode 100644 index 0000000..a9cf023 --- /dev/null +++ b/.rstcheck.cfg @@ -0,0 +1,3 @@ +[rstcheck] +report=warning +ignore_substitutions=today diff --git a/functions.sh b/functions.sh index aa9bf68..fd19c46 100755 --- a/functions.sh +++ b/functions.sh @@ -133,19 +133,18 @@ EOF # Setup networking on provisioned hosts (Adapt setup_network.sh according to your network setup) setup_network() { -# Set Upper limit of number nodes in RI2 cluster (starting from 0) -NODE_MAX_ID=$(($(yq r "$CURRENTPATH"/hw_config/"$VENDOR"/idf.yaml --length idf.kubespray.hostnames)-1)) - -for idx in $(seq 0 "$NODE_MAX_ID") -do - NODE_IP=$(get_host_pxe_ip "nodes[${idx}]") -# SSH to jumphost - # shellcheck disable=SC2087 - ssh -o StrictHostKeyChecking=no -tT "$USERNAME"@"$(get_vm_ip)" << EOF + # Set Upper limit of number nodes in RI2 cluster (starting from 0) + NODE_MAX_ID=$(($(yq r "$CURRENTPATH"/hw_config/"$VENDOR"/idf.yaml --length idf.kubespray.hostnames)-1)) + + for idx in $(seq 0 "$NODE_MAX_ID"); do + NODE_IP=$(get_host_pxe_ip "nodes[${idx}]") + # SSH to jumphost + # shellcheck disable=SC2087 + ssh -o StrictHostKeyChecking=no -tT "$USERNAME"@"$(get_vm_ip)" << EOF ssh -o StrictHostKeyChecking=no root@${NODE_IP} \ 'bash -s' < ${PROJECT_ROOT}/${VENDOR}/setup_network.sh EOF -done + done } # k8s Provisioning (currently BMRA) diff --git a/playbooks/roles/bmra-config/tasks/main.yaml b/playbooks/roles/bmra-config/tasks/main.yaml index 19b011a..e7d8df9 100644 --- a/playbooks/roles/bmra-config/tasks/main.yaml +++ b/playbooks/roles/bmra-config/tasks/main.yaml @@ -1,3 +1,4 @@ +--- - name: write BMRA config template: src: "inventory.ini" -- 2.16.6