ansible-playbooks/playbookconfig/src/playbooks/roles/bootstrap/bringup-essential-services/tasks/bringup_flock_services.yml

54 lines
1.5 KiB
YAML

---
#
# Copyright (c) 2019 Wind River Systems, Inc.
#
# SPDX-License-Identifier: Apache-2.0
#
# SUB-TASKS DESCRIPTION:
# - Restart Barbican
# - Start up FM, skip auth middleware as it is not functional at this
# early stage
# - Start up Maintenance Agent
# - Restart Maintenance Client to pick the new config which will update
# the controller-0 status from offline to online.
#
- block:
- name: Update barbican bind host with management floating IP
replace:
path: /etc/barbican/barbican.conf
regexp: "bind_host=.*$"
replace: "bind_host={{ controller_floating_address | ipwrap }}"
- name: Restart barbican
systemd:
state: restarted
name: openstack-barbican-api
- name: Apply workaround for fm-api
lineinfile:
path: /etc/fm/api-paste.ini
line: "pipeline=request_id api_v1"
regex: "pipeline*"
- name: Update bind_host config parameter in fm config file
replace:
path: /etc/fm/fm.conf
regexp: "bind_host=.*$"
replace: "bind_host={{ controller_floating_address }}"
- name: Restart FM API and bring up FM Manager
command: "{{ item }}"
with_items:
- /etc/init.d/fm-api restart
- /etc/init.d/fminit start
- name: Bring up Maintenance Agent
command: /usr/lib/ocf/resource.d/platform/mtcAgent start
- name: Restart Maintenance Client
command: /etc/init.d/mtcClient restart
environment: # block environment
OCF_ROOT: "/usr/lib/ocf"
OCF_RESKEY_state: "active"