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."
|
- name: "Execute `dmesg` to collect debugging output should VM creation fail."
|
||||||
command: dmesg
|
command: dmesg
|
||||||
when: task_create_vm_nodes.rc != 0
|
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
|
command: virsh capabilities
|
||||||
when: task_create_vm_nodes.rc != 0
|
when: task_create_vm_nodes.rc != 0
|
||||||
- name: "Abort due to failed VM creation"
|
- 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
|
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:
|
file:
|
||||||
path: "{{baremetal_csv_file}}"
|
path: "{{baremetal_csv_file}}"
|
||||||
owner: "{{ansible_env.SUDO_USER}}"
|
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
|
when: ci_testing_zuul is defined
|
||||||
- name: "Create an SSH key for Jenkins user if operating in OpenStack CI"
|
- name: "Create an SSH key for Jenkins user if operating in OpenStack CI"
|
||||||
shell: ssh-keygen -f ~/.ssh/id_rsa -N ""
|
shell: ssh-keygen -f ~/.ssh/id_rsa -N ""
|
||||||
when: ci_testing_zuul is defined and test_ssh_public_key_path.stat.exists == false
|
when: >
|
||||||
- name: "Create an empty SSH known_hosts file for Jenkins user if operating in OpenStack CI"
|
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
|
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
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# 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
|
# NOTE(TheJulia): This is executed as a raw command to validate the remote
|
||||||
# hostname. This is because cirros lacks sftp support.
|
# hostname. This is because cirros lacks sftp support.
|
||||||
raw: hostname
|
raw: hostname
|
||||||
register: instance_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
|
# 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
|
# 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
|
# 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.
|
# 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
|
# NOTE(TheJulia): If we go down the path of additional validation, we need
|
||||||
# to keep things like Cirros in mind.
|
# 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.'
|
fail: >
|
||||||
when: '"ubuntu" in instance_hostname.stdout or "cirros" in instance_hostname.stdout or "debian" in instance_hostname.stdout or "centos" in instance_hostname.stdout'
|
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…
x
Reference in New Issue
Block a user