Move database creation into role (designate)
There is no record for why we implement the database creation outside of the role in the playbook, when we could do it inside the role. Implementing it inside the role allows us to reduce the quantity of group_vars duplicated from the role, and allows us to better document the required variables in the role. The delegation can still be done as it is done in the playbook too. In this patch we remove the group_vars which were duplicated from the role, and remove the DB setup tasks as they are no longer required. Depends-On: https://review.openstack.org/578808 Change-Id: I3d96a5d0bbec355d6edec25c4b567e4399946dc0
This commit is contained in:
parent
cc62907734
commit
300a076fd2
@ -13,11 +13,6 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
# Galera
|
||||
designate_galera_address: "{{ galera_address }}"
|
||||
designate_galera_user: designate
|
||||
designate_galera_database_name: designate
|
||||
|
||||
# If there are any Ceilometer hosts in the environment, then enable its usage
|
||||
designate_ceilometer_enabled: "{{ (groups['designate_all'] is defined) and (groups['designate_all'] | length > 0) and (groups['ceilometer_all'] is defined) and (groups['ceilometer_all'] | length > 0) }}"
|
||||
|
||||
|
@ -20,6 +20,9 @@
|
||||
hosts: designate_all
|
||||
gather_facts: "{{ osa_gather_facts | default(True) }}"
|
||||
user: root
|
||||
environment: "{{ deployment_environment_variables | default({}) }}"
|
||||
tags:
|
||||
- designate
|
||||
pre_tasks:
|
||||
- include: "common-tasks/os-{{ container_tech | default('lxc') }}-container-setup.yml"
|
||||
|
||||
@ -32,6 +35,7 @@
|
||||
when:
|
||||
- inventory_hostname == groups['designate_all'][0]
|
||||
- groups[designate_oslomsg_rpc_host_group] | length > 0
|
||||
|
||||
- include: common-tasks/oslomsg-notify-vhost-user.yml
|
||||
static: no
|
||||
vars:
|
||||
@ -48,14 +52,7 @@
|
||||
log_dirs:
|
||||
- src: "/openstack/log/{{ inventory_hostname }}-designate"
|
||||
dest: "/var/log/designate"
|
||||
- include: common-tasks/mysql-db-user.yml
|
||||
static: no
|
||||
vars:
|
||||
user_name: "{{ designate_galera_user }}"
|
||||
password: "{{ designate_galera_password }}"
|
||||
login_host: "{{ designate_galera_address }}"
|
||||
db_name: "{{ designate_galera_database_name }}"
|
||||
when: inventory_hostname == groups['designate_all'][0]
|
||||
|
||||
- include: common-tasks/unbound-clients.yml
|
||||
static: no
|
||||
when:
|
||||
@ -69,7 +66,3 @@
|
||||
rsyslog_client_log_rotate_file: designate_log_rotate
|
||||
rsyslog_client_log_dir: "/var/log/designate"
|
||||
rsyslog_client_config_name: "99-designate-rsyslog-client.conf"
|
||||
|
||||
environment: "{{ deployment_environment_variables | default({}) }}"
|
||||
tags:
|
||||
- designate
|
||||
|
Loading…
Reference in New Issue
Block a user