diff --git a/playbooks/roles/bifrost-create-vm-nodes/tasks/main.yml b/playbooks/roles/bifrost-create-vm-nodes/tasks/main.yml index 809cc1251..c73574aa5 100644 --- a/playbooks/roles/bifrost-create-vm-nodes/tasks/main.yml +++ b/playbooks/roles/bifrost-create-vm-nodes/tasks/main.yml @@ -62,14 +62,23 @@ - name: "Execute `dmesg` to collect debugging output should VM creation fail." command: dmesg when: task_create_vm_nodes.rc != 0 -- name: "Execute `virsh capabilities` to collect debugging output should VM creation fail." +- name: > + "Execute `virsh capabilities` to collect debugging output + should VM creation fail." command: virsh capabilities when: task_create_vm_nodes.rc != 0 - name: "Abort due to failed VM creation" - fail: msg="VM creation step failed, please review dmesg output for additional details" + fail: > + msg="VM creation step failed, please review dmesg + output for additional details" when: task_create_vm_nodes.rc != 0 -- name: "Set file permissions such that the baremetal csv file at /tmp/baremetal.csv can be read by the user executing Ansible" +- name: > + "Set file permissions such that the baremetal csv file at /tmp/baremetal.csv + can be read by the user executing Ansible" file: path: "{{baremetal_csv_file}}" owner: "{{ansible_env.SUDO_USER}}" - when: ansible_env.SUDO_USER is defined and baremetal_csv_file is defined and baremetal_csv_file != "" + when: > + ansible_env.SUDO_USER is defined and + baremetal_csv_file is defined and + baremetal_csv_file != "" diff --git a/playbooks/roles/bifrost-openstack-ci-prep/tasks/main.yml b/playbooks/roles/bifrost-openstack-ci-prep/tasks/main.yml index 4427553e5..c2e7505c2 100644 --- a/playbooks/roles/bifrost-openstack-ci-prep/tasks/main.yml +++ b/playbooks/roles/bifrost-openstack-ci-prep/tasks/main.yml @@ -27,7 +27,13 @@ when: ci_testing_zuul is defined - name: "Create an SSH key for Jenkins user if operating in OpenStack CI" shell: ssh-keygen -f ~/.ssh/id_rsa -N "" - when: ci_testing_zuul is defined and test_ssh_public_key_path.stat.exists == false -- name: "Create an empty SSH known_hosts file for Jenkins user if operating in OpenStack CI" + when: > + ci_testing_zuul is defined and + test_ssh_public_key_path.stat.exists |bool == false +- name: > + "Create an empty SSH known_hosts file for Jenkins user + if operating in OpenStack CI" shell: touch ~/.ssh/known_hosts && chmod 600 ~/.ssh/known_hosts - when: ci_testing_zuul is defined and test_ssh_public_key_path.stat.exists == false + when: > + ci_testing_zuul is defined and + test_ssh_public_key_path.stat.exists | bool == false diff --git a/playbooks/roles/bifrost-test-vm/tasks/main.yml b/playbooks/roles/bifrost-test-vm/tasks/main.yml index ed3cc2441..20ea80b2a 100644 --- a/playbooks/roles/bifrost-test-vm/tasks/main.yml +++ b/playbooks/roles/bifrost-test-vm/tasks/main.yml @@ -12,12 +12,15 @@ # See the License for the specific language governing permissions and # limitations under the License. --- -- name: "Execute ping step to verify connectivity and login to the host. If this fails, the configdrive may not have loaded." +- name: > + "Execute ping step to verify connectivity and login to the host. + If this fails, the configdrive may not have loaded." # NOTE(TheJulia): This is executed as a raw command to validate the remote # hostname. This is because cirros lacks sftp support. raw: hostname register: instance_hostname -- name: 'Error if hostname is set to "ubuntu", "cirros", "debian", or "centos"' +- name: > + 'Error if hostname is set to "ubuntu", "cirros", "debian", or "centos"' # TODO: Presently this step is unable to cycle through each host and verify # its hostname is properly set. Perhaps if there was some way to extract # the data on each host from ironic's DB and then verify that information @@ -27,5 +30,11 @@ # which will allow this role to do validation of the remote node. # NOTE(TheJulia): If we go down the path of additional validation, we need # to keep things like Cirros in mind. - fail: msg='Check if hostname was changed from the default value. If this fails, the configdrive may not have been used.' - when: '"ubuntu" in instance_hostname.stdout or "cirros" in instance_hostname.stdout or "debian" in instance_hostname.stdout or "centos" in instance_hostname.stdout' + fail: > + msg='Check if hostname was changed from the default value. + If this fails, the configdrive may not have been used.' + when: > + "ubuntu" in instance_hostname.stdout or + "cirros" in instance_hostname.stdout or + "debian" in instance_hostname.stdout or + "centos" in instance_hostname.stdout