Updated from OpenStack Ansible Tests

Change-Id: I4b1b1754b79b2ce583a3cf175a6094cb69cc9a44
This commit is contained in:
OpenStack Proposal Bot 2020-10-19 09:20:42 +00:00 committed by Dmitriy Rabotyagov
parent 9cf165dfce
commit 00e7b86135
10 changed files with 30 additions and 33 deletions

4
Vagrantfile vendored
View File

@ -31,8 +31,8 @@ Vagrant.configure(2) do |config|
./run_tests.sh ./run_tests.sh
SHELL SHELL
config.vm.define "centos7" do |centos7| config.vm.define "centos8" do |centos8|
centos7.vm.box = "centos/7" centos8.vm.box = "centos/8"
end end
config.vm.define "debian8" do |debian8| config.vm.define "debian8" do |debian8|

View File

@ -51,13 +51,10 @@ fi
# Source distribution information # Source distribution information
source /etc/os-release || source /usr/lib/os-release source /etc/os-release || source /usr/lib/os-release
# Prefer dnf over yum for CentOS.
which dnf &>/dev/null && RHT_PKG_MGR='dnf' || RHT_PKG_MGR='yum'
# Figure out the appropriate package install command # Figure out the appropriate package install command
case ${ID,,} in case ${ID,,} in
*suse*) pkg_mgr_cmd="zypper -n in" ;; *suse*) pkg_mgr_cmd="zypper -n in" ;;
centos|rhel|fedora) pkg_mgr_cmd="${RHT_PKG_MGR} install -y" ;; centos|rhel|fedora) pkg_mgr_cmd="dnf install -y" ;;
ubuntu|debian) pkg_mgr_cmd="apt-get install -y" ;; ubuntu|debian) pkg_mgr_cmd="apt-get install -y" ;;
# Gentoo needs to have version set since it's rolling # Gentoo needs to have version set since it's rolling
gentoo) pkg_mgr_cmd="emerge --jobs=4"; VERSION="rolling" ;; gentoo) pkg_mgr_cmd="emerge --jobs=4"; VERSION="rolling" ;;

View File

@ -28,7 +28,7 @@
- common-mariadb - common-mariadb
block: block:
- name: Create database for service - name: Create database for service
mysql_db: community.mysql.mysql_db:
name: "{{ item.name }}" name: "{{ item.name }}"
login_host: "{{ _oslodb_setup_endpoint | default(omit) }}" login_host: "{{ _oslodb_setup_endpoint | default(omit) }}"
login_port: "{{ _oslodb_setup_port | default(omit) }}" login_port: "{{ _oslodb_setup_port | default(omit) }}"
@ -36,7 +36,7 @@
no_log: true no_log: true
- name: Grant access to the database for the service - name: Grant access to the database for the service
mysql_user: community.mysql.mysql_user:
name: "{{ item.1.username }}" name: "{{ item.1.username }}"
password: "{{ item.1.password }}" password: "{{ item.1.password }}"
host: "{{ item.1.host | default('%') }}" host: "{{ item.1.host | default('%') }}"

View File

@ -29,12 +29,12 @@
- common-rabbitmq - common-rabbitmq
block: block:
- name: Add RPC RabbitMQ vhost - name: Add RPC RabbitMQ vhost
rabbitmq_vhost: community.rabbitmq.rabbitmq_vhost:
name: "{{ _oslomsg_rpc_vhost }}" name: "{{ _oslomsg_rpc_vhost }}"
state: "present" state: "present"
- name: Apply RPC RabbitMQ vhost policies - name: Apply RPC RabbitMQ vhost policies
rabbitmq_policy: community.rabbitmq.rabbitmq_policy:
name: "{{ item.name }}" name: "{{ item.name }}"
pattern: "{{ item.pattern }}" pattern: "{{ item.pattern }}"
priority: "{{ item.priority | default(0) }}" priority: "{{ item.priority | default(0) }}"
@ -43,7 +43,7 @@
loop: "{{ _oslomsg_rpc_policies | default([]) + oslomsg_rpc_policies }}" loop: "{{ _oslomsg_rpc_policies | default([]) + oslomsg_rpc_policies }}"
- name: Add RPC RabbitMQ user - name: Add RPC RabbitMQ user
rabbitmq_user: community.rabbitmq.rabbitmq_user:
user: "{{ _oslomsg_rpc_userid }}" user: "{{ _oslomsg_rpc_userid }}"
password: "{{ _oslomsg_rpc_password }}" password: "{{ _oslomsg_rpc_password }}"
update_password: always update_password: always
@ -63,7 +63,7 @@
- common-rabbitmq - common-rabbitmq
block: block:
- name: Add Notify RabbitMQ vhost - name: Add Notify RabbitMQ vhost
rabbitmq_vhost: community.rabbitmq.rabbitmq_vhost:
name: "{{ _oslomsg_notify_vhost }}" name: "{{ _oslomsg_notify_vhost }}"
state: "present" state: "present"
when: when:
@ -71,7 +71,7 @@
(_oslomsg_notify_vhost != _oslomsg_rpc_vhost) (_oslomsg_notify_vhost != _oslomsg_rpc_vhost)
- name: Apply Notify RabbitMQ vhost policies - name: Apply Notify RabbitMQ vhost policies
rabbitmq_policy: community.rabbitmq.rabbitmq_policy:
name: "{{ item.name }}" name: "{{ item.name }}"
pattern: "{{ item.pattern }}" pattern: "{{ item.pattern }}"
priority: "{{ item.priority | default(0) }}" priority: "{{ item.priority | default(0) }}"
@ -83,7 +83,7 @@
(_oslomsg_notify_vhost != _oslomsg_rpc_vhost) (_oslomsg_notify_vhost != _oslomsg_rpc_vhost)
- name: Add Notify RabbitMQ user - name: Add Notify RabbitMQ user
rabbitmq_user: community.rabbitmq.rabbitmq_user:
user: "{{ _oslomsg_notify_userid }}" user: "{{ _oslomsg_notify_userid }}"
password: "{{ _oslomsg_notify_password }}" password: "{{ _oslomsg_notify_password }}"
update_password: always update_password: always

View File

@ -47,7 +47,7 @@
- octavia_download_result is changed - octavia_download_result is changed
block: block:
- name: Get current image id - name: Get current image id
openstack.cloud.os_image_info: openstack.cloud.image_info:
auth: auth:
auth_url: "{{ keystone_service_adminurl }}" auth_url: "{{ keystone_service_adminurl }}"
username: "{{ octavia_service_user_name }}" username: "{{ octavia_service_user_name }}"
@ -80,7 +80,7 @@
amphora-x64-haproxy amphora-x64-haproxy
- name: Delete old image from glance - name: Delete old image from glance
openstack.cloud.os_image: openstack.cloud.image:
auth: auth:
auth_url: "{{ keystone_service_adminurl }}" auth_url: "{{ keystone_service_adminurl }}"
username: "{{ octavia_service_user_name }}" username: "{{ octavia_service_user_name }}"

View File

@ -25,7 +25,7 @@
block: block:
- name: Create Octavia Flavor - name: Create Octavia Flavor
run_once: true run_once: true
openstack.cloud.os_nova_flavor: openstack.cloud.compute_flavor:
auth: auth:
auth_url: "{{ keystone_service_adminurl }}" auth_url: "{{ keystone_service_adminurl }}"
username: "{{ octavia_service_user_name }}" username: "{{ octavia_service_user_name }}"

View File

@ -25,7 +25,7 @@
block: block:
- name: Create mgmt network - name: Create mgmt network
run_once: true run_once: true
openstack.cloud.os_network: openstack.cloud.network:
auth: auth:
auth_url: "{{ keystone_service_adminurl }}" auth_url: "{{ keystone_service_adminurl }}"
username: "{{ octavia_service_user_name }}" username: "{{ octavia_service_user_name }}"
@ -50,7 +50,7 @@
- name: Ensure mgmt subnet exists - name: Ensure mgmt subnet exists
run_once: true run_once: true
openstack.cloud.os_subnet: openstack.cloud.subnet:
auth: auth:
auth_url: "{{ keystone_service_adminurl }}" auth_url: "{{ keystone_service_adminurl }}"
username: "{{ octavia_service_user_name }}" username: "{{ octavia_service_user_name }}"

View File

@ -47,7 +47,7 @@
- octavia_nova_flavor_uuid is not defined - octavia_nova_flavor_uuid is not defined
block: block:
- name: Get Octavia flavor details - name: Get Octavia flavor details
openstack.cloud.os_flavor_info: openstack.cloud.compute_flavor_info:
auth: auth:
auth_url: "{{ keystone_service_adminurl }}" auth_url: "{{ keystone_service_adminurl }}"
username: "{{ octavia_service_user_name }}" username: "{{ octavia_service_user_name }}"
@ -75,7 +75,7 @@
- octavia_neutron_management_network_name is defined - octavia_neutron_management_network_name is defined
block: block:
- name: Get octavia management network details - name: Get octavia management network details
openstack.cloud.os_networks_info: openstack.cloud.networks_info:
auth: auth:
auth_url: "{{ keystone_service_adminurl }}" auth_url: "{{ keystone_service_adminurl }}"
username: "{{ octavia_service_user_name }}" username: "{{ octavia_service_user_name }}"

View File

@ -24,7 +24,7 @@
ansible_python_interpreter: "{{ octavia_service_setup_host_python_interpreter }}" ansible_python_interpreter: "{{ octavia_service_setup_host_python_interpreter }}"
block: block:
- name: Setup the service project quota - name: Setup the service project quota
openstack.cloud.os_quota: openstack.cloud.quota:
cloud: default cloud: default
interface: admin interface: admin
name: "{{ octavia_service_project_name }}" name: "{{ octavia_service_project_name }}"
@ -38,7 +38,7 @@
port: "{{ octavia_num_ports }}" port: "{{ octavia_num_ports }}"
- name: Create Octavia security group - name: Create Octavia security group
openstack.cloud.os_security_group: openstack.cloud.security_group:
auth: auth:
auth_url: "{{ keystone_service_adminurl }}" auth_url: "{{ keystone_service_adminurl }}"
username: "{{ octavia_service_user_name }}" username: "{{ octavia_service_user_name }}"
@ -57,7 +57,7 @@
delay: 10 delay: 10
- name: Create security group rule for agent - name: Create security group rule for agent
openstack.cloud.os_security_group_rule: openstack.cloud.security_group_rule:
auth: auth:
auth_url: "{{ keystone_service_adminurl }}" auth_url: "{{ keystone_service_adminurl }}"
username: "{{ octavia_service_user_name }}" username: "{{ octavia_service_user_name }}"
@ -79,7 +79,7 @@
delay: 10 delay: 10
- name: Create security group rule for ssh - name: Create security group rule for ssh
openstack.cloud.os_security_group_rule: openstack.cloud.security_group_rule:
auth: auth:
auth_url: "{{ keystone_service_adminurl }}" auth_url: "{{ keystone_service_adminurl }}"
username: "{{ octavia_service_user_name }}" username: "{{ octavia_service_user_name }}"
@ -103,7 +103,7 @@
- octavia_ssh_enabled | bool - octavia_ssh_enabled | bool
- name: Create security group rule for icmp - name: Create security group rule for icmp
openstack.cloud.os_security_group_rule: openstack.cloud.security_group_rule:
auth: auth:
auth_url: "{{ keystone_service_adminurl }}" auth_url: "{{ keystone_service_adminurl }}"
username: "{{ octavia_service_user_name }}" username: "{{ octavia_service_user_name }}"

View File

@ -32,7 +32,7 @@
ansible_python_interpreter: "{{ _service_setup_host_python_interpreter }}" ansible_python_interpreter: "{{ _service_setup_host_python_interpreter }}"
block: block:
- name: Add keystone domain - name: Add keystone domain
openstack.cloud.os_keystone_domain: openstack.cloud.identity_domain:
cloud: default cloud: default
state: present state: present
description: "{{ _domain_name_description | default(omit) }}" description: "{{ _domain_name_description | default(omit) }}"
@ -46,7 +46,7 @@
delay: 10 delay: 10
- name: Add service project - name: Add service project
openstack.cloud.os_project: openstack.cloud.project:
cloud: default cloud: default
state: present state: present
name: "{{ _project_name }}" name: "{{ _project_name }}"
@ -63,7 +63,7 @@
delay: 10 delay: 10
- name: Add services to the keystone service catalog - name: Add services to the keystone service catalog
openstack.cloud.os_keystone_service: openstack.cloud.catalog_service:
cloud: default cloud: default
state: "{{ item.state | default('present') }}" state: "{{ item.state | default('present') }}"
name: "{{ item.name }}" name: "{{ item.name }}"
@ -79,7 +79,7 @@
delay: 10 delay: 10
- name: Add keystone roles - name: Add keystone roles
openstack.cloud.os_keystone_role: openstack.cloud.identity_role:
cloud: default cloud: default
state: present state: present
name: "{{ item.role }}" name: "{{ item.role }}"
@ -98,7 +98,7 @@
no_log: True no_log: True
- name: Add service users - name: Add service users
openstack.cloud.os_user: openstack.cloud.identity_user:
cloud: default cloud: default
state: present state: present
name: "{{ item.name }}" name: "{{ item.name }}"
@ -122,7 +122,7 @@
no_log: True no_log: True
- name: Add service users to the role - name: Add service users to the role
openstack.cloud.os_user_role: openstack.cloud.role_assignment:
cloud: default cloud: default
state: present state: present
user: "{{ item.name }}" user: "{{ item.name }}"
@ -145,7 +145,7 @@
no_log: True no_log: True
- name: Add endpoints to keystone endpoint catalog - name: Add endpoints to keystone endpoint catalog
openstack.cloud.os_keystone_endpoint: openstack.cloud.endpoint:
cloud: default cloud: default
state: "{{ item.state | default('present') }}" state: "{{ item.state | default('present') }}"
service: "{{ item.service }}" service: "{{ item.service }}"