mirror of
https://bitbucket.org/atlassian/dc-deployments-automation.git
synced 2025-12-16 01:43:06 -06:00
add managing individual lines in mesh.properties using values from template
This commit is contained in:
@@ -64,6 +64,14 @@
|
||||
- new_meshvol_from_snap is defined
|
||||
- new_meshvol_from_snap | bool
|
||||
|
||||
# handle adding/updating some ansible managed mesh properties
|
||||
- name: Import management of additional ansible-managed mesh properties
|
||||
ansible.builtin.import_tasks:
|
||||
file: mesh_properties.yml
|
||||
when:
|
||||
- atl_mesh_properties is defined
|
||||
- atl_mesh_properties | length > 0
|
||||
|
||||
# handle reregistering the correct node if node.id exists
|
||||
- name: Set mesh_node_id var from the existing mesh.properties file
|
||||
ansible.builtin.set_fact:
|
||||
|
||||
11
roles/bitbucket_mesh_config/tasks/mesh_properties.yml
Normal file
11
roles/bitbucket_mesh_config/tasks/mesh_properties.yml
Normal file
@@ -0,0 +1,11 @@
|
||||
---
|
||||
# Rather than managing the entire mesh.properties file, we only manage individual
|
||||
# properties because upstream the product sets some properties by editing the file
|
||||
- name: Update additional ansible-managed mesh properties
|
||||
ansible.builtin.lineinfile:
|
||||
path: "{{ mesh_properties_file }}"
|
||||
search_string: "{{ mesh_prop_key }}="
|
||||
line: "{{ item }}"
|
||||
vars:
|
||||
mesh_prop_key: "{{ item.split('=') | first }}"
|
||||
loop: "{{ atl_mesh_properties }}"
|
||||
Reference in New Issue
Block a user