Updated from OpenStack Ansible Tests
Change-Id: I716026ab16646b34312bae47476e1424acbbb0b2
This commit is contained in:
parent
da37165600
commit
e5dd6bd7c9
|
@ -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|
|
||||||
|
|
|
@ -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" ;;
|
||||||
|
|
|
@ -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('%') }}"
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue