Cosmetic cleanup to keystone tests
This commit updates test.yml to bring names and container creation in line with the work done in [1] and [2]. [1] https://review.openstack.org/#/c/289353/ [2] https://review.openstack.org/#/c/289856/ Change-Id: I65820530b40828a8053e5c4747781e15cee391ee
This commit is contained in:
@@ -13,7 +13,7 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
- name: Playbook for pre-role testing 1of3
|
||||
- name: Playbook for establishing ssh keys
|
||||
hosts: 127.0.0.1
|
||||
connection: local
|
||||
become: false
|
||||
@@ -24,19 +24,19 @@
|
||||
generate_ssh_key: "yes"
|
||||
ssh_key_bits: 2048
|
||||
ssh_key_file: ".ssh/id_rsa"
|
||||
- name: get the calling users key
|
||||
- name: Get the calling user's key
|
||||
command: cat ~/.ssh/id_rsa.pub
|
||||
register: key_get
|
||||
- set_fact:
|
||||
lxc_container_ssh_key: "{{ key_get.stdout }}"
|
||||
|
||||
- name: Playbook for pre-role testing 2of3
|
||||
- name: Playbook for configuring LXC host
|
||||
hosts: localhost
|
||||
connection: local
|
||||
become: yes
|
||||
pre_tasks:
|
||||
# Make sure OS does not have a stale package cache.
|
||||
- name: Update apt cache.
|
||||
- name: Update apt cache
|
||||
apt:
|
||||
update_cache: yes
|
||||
when: ansible_os_family == 'Debian'
|
||||
@@ -78,7 +78,7 @@
|
||||
# done for functional testing.
|
||||
- name: Create container hosts
|
||||
add_host:
|
||||
groups: "all,all_containers,rabbitmq_all,galera_all,service_all"
|
||||
groups: "{{ item.groups }}"
|
||||
hostname: "{{ item.name }}"
|
||||
inventory_hostname: "{{ item.name }}"
|
||||
ansible_ssh_host: "{{ item.address }}"
|
||||
@@ -95,30 +95,11 @@
|
||||
physical_host: localhost
|
||||
container_name: "{{ item.name }}"
|
||||
with_items:
|
||||
- { name: "service1", service: "service1", address: "10.100.100.101" }
|
||||
- name: Create container hosts
|
||||
add_host:
|
||||
groups: "all,all_containers,keystone_all"
|
||||
hostname: "{{ item.name }}"
|
||||
inventory_hostname: "{{ item.name }}"
|
||||
ansible_ssh_host: "{{ item.address }}"
|
||||
ansible_become: true
|
||||
properties:
|
||||
service_name: "{{ item.service }}"
|
||||
container_networks:
|
||||
management_address:
|
||||
address: "{{ item.address }}"
|
||||
bridge: "lxcbr0"
|
||||
interface: "eth1"
|
||||
netmask: "255.255.252.0"
|
||||
type: "veth"
|
||||
physical_host: localhost
|
||||
container_name: "{{ item.name }}"
|
||||
with_items:
|
||||
- { name: "keystone1", service: "keystone1", address: "10.100.100.102" }
|
||||
- { name: "keystone2", service: "keystone2", address: "10.100.100.103" }
|
||||
- { name: "infra1", service: "infra1", address: "10.100.100.101", groups: "all,all_containers,rabbitmq_all,galera_all,service_all" }
|
||||
- { name: "keystone1", service: "keystone1", address: "10.100.100.102", groups: "all,all_containers,keystone_all" }
|
||||
- { name: "keystone2", service: "keystone2", address: "10.100.100.103", groups: "all,all_containers,keystone_all" }
|
||||
|
||||
- name: Playbook for pre-role testing 3of3
|
||||
- name: Playbook for creating containers
|
||||
hosts: all_containers
|
||||
connection: local
|
||||
gather_facts: false
|
||||
@@ -137,7 +118,7 @@
|
||||
search_regex: OpenSSH
|
||||
delay: 1
|
||||
|
||||
- name: Playbook for role testing
|
||||
- name: Playbook for deploying infra services
|
||||
hosts: service_all
|
||||
user: root
|
||||
gather_facts: true
|
||||
@@ -155,12 +136,12 @@
|
||||
- { option: "gcache.size", value: "32M" }
|
||||
galera_server_id: "{{ inventory_hostname | string_2_int }}"
|
||||
|
||||
- name: Playbook for role testing
|
||||
- name: Playbook for deploying keystone
|
||||
hosts: keystone_all
|
||||
user: root
|
||||
gather_facts: true
|
||||
pre_tasks:
|
||||
- name: Ensure Rabbitmq vhost
|
||||
- name: Ensure rabbitmq vhost
|
||||
rabbitmq_vhost:
|
||||
name: "{{ keystone_rabbitmq_vhost }}"
|
||||
state: "present"
|
||||
@@ -230,5 +211,5 @@
|
||||
keystone_rabbitmq_userid: keystone
|
||||
keystone_rabbitmq_vhost: /keystone
|
||||
keystone_rabbitmq_servers: 10.100.100.101
|
||||
keystone_rabbitmq_use_ssl: false
|
||||
keystone_rabbitmq_use_ssl: true
|
||||
galera_client_drop_config_file: false
|
||||
|
||||
Reference in New Issue
Block a user