mirror of
https://bitbucket.org/atlassian/dc-deployments-automation.git
synced 2025-12-15 09:23:06 -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.
|
# 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:
|
ansible.builtin.uri:
|
||||||
url: '{{ atl_proxy_name }}/rest/api/latest/admin/git/mesh/nodes'
|
url: '{{ atl_proxy_name }}/rest/api/latest/admin/git/mesh/nodes'
|
||||||
method: POST
|
method: POST
|
||||||
@@ -14,13 +14,14 @@
|
|||||||
body:
|
body:
|
||||||
name: "{{ mesh_node_name }}"
|
name: "{{ mesh_node_name }}"
|
||||||
rpcUrl: "{{ mesh_node_scheme }}://{{ mesh_node_name }}.{{ atl_aws_stack_name }}-{{ ansible_ec2_placement_region }}.{{ atl_hostedzone }}:{{ mesh_node_port }}"
|
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
|
register: register_mesh_node_result
|
||||||
until: register_mesh_node_result is not failed
|
until: register_mesh_node_result is not failed
|
||||||
retries: 5
|
retries: 5
|
||||||
delay: 30
|
delay: 30
|
||||||
no_log: True
|
no_log: True
|
||||||
|
|
||||||
- name: Update Mesh Node
|
- name: Update Existing Mesh Node
|
||||||
ansible.builtin.uri:
|
ansible.builtin.uri:
|
||||||
url: '{{ atl_proxy_name }}/rest/api/latest/admin/git/mesh/nodes/{{ mesh_node_id }}'
|
url: '{{ atl_proxy_name }}/rest/api/latest/admin/git/mesh/nodes/{{ mesh_node_id }}'
|
||||||
method: PUT
|
method: PUT
|
||||||
@@ -41,6 +42,15 @@
|
|||||||
delay: 30
|
delay: 30
|
||||||
no_log: True
|
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
|
- name: Remove orphan_vol lease lock
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
path: '{{ atl_shared_mountpoint }}/.{{ orphan_vol }}'
|
path: '{{ atl_shared_mountpoint }}/.{{ orphan_vol }}'
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
that:
|
that:
|
||||||
- mesh_nodes_report.json | community.general.json_query(query) | length == 0
|
- mesh_nodes_report.json | community.general.json_query(query) | length == 0
|
||||||
changed_when: true
|
changed_when: true
|
||||||
notify: Update Mesh Node
|
notify: Update Existing Mesh Node
|
||||||
when:
|
when:
|
||||||
- bitbucket_cluster_available
|
- bitbucket_cluster_available
|
||||||
- mesh_nodes_report.json | community.general.json_query(query) | length == 0
|
- mesh_nodes_report.json | community.general.json_query(query) | length == 0
|
||||||
@@ -48,7 +48,7 @@
|
|||||||
that:
|
that:
|
||||||
- mesh_nodes_report.json | community.general.json_query(query) | length == 0
|
- mesh_nodes_report.json | community.general.json_query(query) | length == 0
|
||||||
changed_when: true
|
changed_when: true
|
||||||
notify: Register Mesh Node
|
notify: Register New Mesh Node
|
||||||
when:
|
when:
|
||||||
- bitbucket_cluster_available
|
- bitbucket_cluster_available
|
||||||
- mesh_nodes_report.json | community.general.json_query(query) | length == 0
|
- mesh_nodes_report.json | community.general.json_query(query) | length == 0
|
||||||
|
|||||||
Reference in New Issue
Block a user