Add CephMgr service to custom roles_data file.
In commit 3cea68f12cd954282a824936922f58768aef5042 new service, CephMgr was introduced. This change add validation for this service to be present in a custom roles_data file, and adds it if missing. This prevents error during ceph upgrade, for e.g.: Please add a mgr host to your inventory. Closes-Bug: 1767304 Change-Id: Iab18f8125a07b20def5bfb22f2ccf0dcbc5ec0ac
This commit is contained in:
parent
f5d093d091
commit
48336cc3cf
|
@ -12,3 +12,18 @@
|
|||
path: "{{ roles_data }}"
|
||||
regexp: '(\s+)- OS::TripleO::Services::ManilaBackendGeneric$'
|
||||
replace: ''
|
||||
|
||||
- name: check CephMgr service present
|
||||
shell: |
|
||||
grep -q 'OS::TripleO::Services::CephMgr' {{ roles_data }}
|
||||
register: ceph_mgr_found
|
||||
failed_when: false
|
||||
|
||||
- name: add CephMgr service
|
||||
lineinfile:
|
||||
path: "{{ roles_data }}"
|
||||
backrefs: true
|
||||
regexp: '(\s+)(- OS::TripleO::Services::CephMon$)'
|
||||
line: '\1- OS::TripleO::Services::CephMgr\n\1\2'
|
||||
insertbefore: '- OS::TripleO::Services::CephMon'
|
||||
when: ceph_mgr_found.rc == 1
|
||||
|
|
Loading…
Reference in New Issue