1 Commits

Author SHA1 Message Date
Egon Rijpkema
1bbf1e4270 added retry 2018-02-20 14:24:41 +01:00
5 changed files with 41 additions and 57 deletions

View File

@@ -1,14 +1,14 @@
---
- import_tasks: common.yml
- import_tasks: rabbitmq.yml
- import_tasks: memcached.yml
- import_tasks: mariadb.yml
- import_tasks: keystone.yml
- import_tasks: glance-controller.yml
- import_tasks: nova-controller.yml
- import_tasks: neutron-controller.yml
- import_tasks: cinder-controller.yml
- import_tasks: cinder-storage.yml
- import_tasks: nova-compute.yml
- import_tasks: horizon.yml
- import_tasks: gcc-post-install.yml
- include: common.yml
- include: rabbitmq.yml
- include: memcached.yml
- include: mariadb.yml
- include: keystone.yml
- include: glance-controller.yml
- include: nova-controller.yml
- include: neutron-controller.yml
- include: cinder-controller.yml
- include: cinder-storage.yml
- include: nova-compute.yml
- include: horizon.yml
- include: gcc-post-install.yml

View File

@@ -5,7 +5,7 @@
- name: Passwordless sudo for admins
lineinfile: dest=/etc/sudoers line="%admin ALL=(ALL:ALL) NOPASSWD:ALL"
- import_tasks: users.yml
- include: users.yml
- name: common | install packages
apt: pkg={{ item }} state=latest update_cache=yes
@@ -26,4 +26,4 @@
owner: root
group: root
- import_tasks: docker.yml
- include: docker.yml

View File

@@ -52,7 +52,7 @@
delay: 3
ignore_errors: yes
- name: keystone manage commands to setup db_sync
- name: keystone manage commands to setup db
command: >
/usr/bin/docker run --rm
--add-host=mariadb:{{ listen_ip | default(hostvars[groups['databases'][0]]['ansible_default_ipv4']['address']) }}
@@ -90,18 +90,15 @@
-e "OS_AUTH_URL=http://${KEYSTONE_HOST}:35357/v3"
-e "OS_PASSWORD={{ secrets['OS_PASSWORD'] }}"
{{ docker_image }} bash /etc/bootstrap.sh
register: result
retries: 7
delay: 3
ignore_errors: yes
- name: install openstack repo host key.
command: apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 5EDB1B62EC4926EA
tags: openstackclient
- name: install openstack repo on host.
apt_repository:
repo: "deb http://ubuntu-cloud.archive.canonical.com/ubuntu xenial-updates/ocata main"
filename: ocata
command: >
echo "deb http://ubuntu-cloud.archive.canonical.com/ubuntu xenial-updates/ocata main" > /etc/apt/sources.list.d/ocata.list &&
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 5EDB1B62EC4926EA
tags: openstackclient
- name: install openstack client for management

View File

@@ -21,14 +21,12 @@
dest: /srv/mariadb/etc/mysql/conf.d/my.cnf
mode: 660
- name: >
Set galara.cnf on node if we have at least three nodes.
And we're part of the cluster.
- name: Set galara.cnf on node if we have at least three nodes.
template:
src: files/galera.cnf
dest: /srv/mariadb/etc/mysql/conf.d/galera.cnf
mode: 660
when: "'databases' in group_names and groups['databases'] | length >= 3"
when: groups['databases'] | length >= 3
# This mimics galera_new_cluster.sh
- name: Initialize a new cluster.
@@ -49,8 +47,7 @@
name: mysql.service
state: started
when: "'databases' in group_names and groups['databases'] \
| length >= 3 and ansible_hostname == hostname_node0"
when: groups['databases'] | length >= 3 and ansible_hostname == hostname_node0
- name: install service file.
block:
@@ -64,22 +61,12 @@
group: root
- name: Give the master node some time to initialize the cluster.
command: bash -c "sleep 60"
when: "'databases' in group_names and groups['databases'] \
| length >= 3"
- name: Daemon reload (the implicit doesn't work)
command: bash -c "systemctl daemon-reload"
command: bash -c "sleep 60 && systemctl daemon-reload"
- name: make sure service is started
systemd:
name: mysql.service
state: started
daemon_reload: yes
- name: start service at boot.
command: systemctl reenable mysql.service
- name: Give the cluster some time to initialize replication.
command: bash -c "sleep 60 && systemctl daemon-reload"
when: "'databases' in group_names and groups['databases'] | length >= 3"

View File

@@ -1,15 +1,15 @@
---
- import_playbook: common.yml
- import_playbook: rabbitmq.yml
- import_playbook: memcached.yml
- import_playbook: mariadb.yml
- import_playbook: keystone.yml
- import_playbook: glance-controller.yml
- import_playbook: nova-controller.yml
- import_playbook: neutron-controller.yml
- import_playbook: cinder-controller.yml
- import_playbook: cinder-storage.yml
- import_playbook: nova-compute.yml
- import_playbook: horizon.yml
- import_playbook: heat.yml
- import_playbook: post-install.yml
- include: common.yml
- include: rabbitmq.yml
- include: memcached.yml
- include: mariadb.yml
- include: keystone.yml
- include: glance-controller.yml
- include: nova-controller.yml
- include: neutron-controller.yml
- include: cinder-controller.yml
- include: cinder-storage.yml
- include: nova-compute.yml
- include: horizon.yml
- include: heat.yml
- include: post-install.yml