mirror of
https://bitbucket.org/atlassian/dc-deployments-automation.git
synced 2025-12-14 08:53:07 -06:00
try stopping mesh after registration of new node to allow further configuration when atl_startup_restart is false
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
---
|
||||
# Handlers are executed in the order they are defined in the handlers section, not in the order listed in the notify statement.
|
||||
|
||||
- name: Register Mesh Node
|
||||
- name: Register New Mesh Node
|
||||
ansible.builtin.uri:
|
||||
url: '{{ atl_proxy_name }}/rest/api/latest/admin/git/mesh/nodes'
|
||||
method: POST
|
||||
@@ -14,13 +14,14 @@
|
||||
body:
|
||||
name: "{{ mesh_node_name }}"
|
||||
rpcUrl: "{{ mesh_node_scheme }}://{{ mesh_node_name }}.{{ atl_aws_stack_name }}-{{ ansible_ec2_placement_region }}.{{ atl_hostedzone }}:{{ mesh_node_port }}"
|
||||
notify: Stop Product
|
||||
register: register_mesh_node_result
|
||||
until: register_mesh_node_result is not failed
|
||||
retries: 5
|
||||
delay: 30
|
||||
no_log: True
|
||||
|
||||
- name: Update Mesh Node
|
||||
- name: Update Existing Mesh Node
|
||||
ansible.builtin.uri:
|
||||
url: '{{ atl_proxy_name }}/rest/api/latest/admin/git/mesh/nodes/{{ mesh_node_id }}'
|
||||
method: PUT
|
||||
@@ -41,6 +42,15 @@
|
||||
delay: 30
|
||||
no_log: True
|
||||
|
||||
- name: Stop Product
|
||||
ansible.builtin.service:
|
||||
name: "{{ atl_systemd_service_name }}"
|
||||
state: stopped
|
||||
when:
|
||||
- not atl_startup_restart | bool
|
||||
- molecule_yml is not defined
|
||||
no_log: true
|
||||
|
||||
- name: Remove orphan_vol lease lock
|
||||
ansible.builtin.file:
|
||||
path: '{{ atl_shared_mountpoint }}/.{{ orphan_vol }}'
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
that:
|
||||
- mesh_nodes_report.json | community.general.json_query(query) | length == 0
|
||||
changed_when: true
|
||||
notify: Update Mesh Node
|
||||
notify: Update Existing Mesh Node
|
||||
when:
|
||||
- bitbucket_cluster_available
|
||||
- mesh_nodes_report.json | community.general.json_query(query) | length == 0
|
||||
@@ -48,7 +48,7 @@
|
||||
that:
|
||||
- mesh_nodes_report.json | community.general.json_query(query) | length == 0
|
||||
changed_when: true
|
||||
notify: Register Mesh Node
|
||||
notify: Register New Mesh Node
|
||||
when:
|
||||
- bitbucket_cluster_available
|
||||
- mesh_nodes_report.json | community.general.json_query(query) | length == 0
|
||||
|
||||
Reference in New Issue
Block a user