Wrap lines to less than 79 characters in misc roles
Updated main playbooks for VM creation, CI prep, and test VM verification to reduce line length and improve readability. Change-Id: Ic43b76e52cbbdf6fed8557b7cb2876fd3ed4307e
This commit is contained in:
parent
affd2eebf4
commit
0a5f21f3f3
@ -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 != ""
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user