Minor testing clean-up
After changing from ubuntu to debian, testing was never updated to validate that the hostname was not ubuntu. Since we support simple-init, we should check for multiple default OS names and fail accordingly if they are found. Additionally, changed the default testing user to root as simple init writes the key to the root user's authorized_keys file. Change-Id: Icce62d0b9256188dbc9b49d948c99bb0c469ae6b
This commit is contained in:
parent
a48cc3d50e
commit
8954bebfaf
@ -9,10 +9,10 @@ mysql_password:
|
|||||||
# virtual machines for the hardware instead of real hardware.
|
# virtual machines for the hardware instead of real hardware.
|
||||||
# testing: true
|
# testing: true
|
||||||
#
|
#
|
||||||
# Normally this user should be ubuntu, however if cirros is used,
|
# Normally this user should be root, however if cirros is used,
|
||||||
# a user may wish to define a specific user for testing VM
|
# a user may wish to define a specific user for testing VM
|
||||||
# connectivity during a test sequence
|
# connectivity during a test sequence
|
||||||
testing_user: ubuntu
|
testing_user: root
|
||||||
http_boot_folder: /httpboot
|
http_boot_folder: /httpboot
|
||||||
nginx_port: 8080
|
nginx_port: 8080
|
||||||
ssh_public_key_path: "{{ ansible_env.HOME }}/.ssh/id_rsa.pub"
|
ssh_public_key_path: "{{ ansible_env.HOME }}/.ssh/id_rsa.pub"
|
||||||
|
@ -25,7 +25,7 @@ hosts: testvm
|
|||||||
name: "Tests connectivity to the VM"
|
name: "Tests connectivity to the VM"
|
||||||
sudo: no
|
sudo: no
|
||||||
gather_facts: yes
|
gather_facts: yes
|
||||||
remote_user: ubuntu
|
remote_user: root
|
||||||
roles:
|
roles:
|
||||||
- role: bifrost-test-vm
|
- role: bifrost-test-vm
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
# 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"'
|
- 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
|
||||||
# it's hostname is properly set. Perhaps if there was some way to extract
|
# it's 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
|
||||||
@ -28,4 +28,4 @@
|
|||||||
# 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='If this fails, the configdrive may not have been used as the hostname was set to the default.'
|
fail: msg='If this fails, the configdrive may not have been used as the hostname was set to the default.'
|
||||||
when: '"ubuntu" in instance_hostname.stdout or "cirros" in instance_hostname.stdout'
|
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