mirror of
https://bitbucket.org/atlassian/dc-deployments-automation.git
synced 2025-12-14 00:43:06 -06:00
66 lines
2.0 KiB
YAML
66 lines
2.0 KiB
YAML
---
|
|
# Handlers are executed in the order they are defined in the handlers section, not in the order listed in the notify statement.
|
|
|
|
- name: Restart Product
|
|
ansible.builtin.service:
|
|
name: "{{ atl_systemd_service_name }}"
|
|
state: restarted
|
|
when:
|
|
- atl_startup_restart
|
|
- molecule_yml is not defined
|
|
no_log: true
|
|
|
|
- name: Enable Product
|
|
ansible.builtin.service:
|
|
name: "{{ atl_systemd_service_name }}"
|
|
enabled: true
|
|
when:
|
|
- atl_startup_enable
|
|
- molecule_yml is not defined
|
|
no_log: true
|
|
|
|
- name: register_mesh_node
|
|
ansible.builtin.uri:
|
|
url: '{{ atl_proxy_name }}/rest/api/latest/admin/git/mesh/nodes'
|
|
method: POST
|
|
headers:
|
|
Content-Type: 'application/json'
|
|
Accept: 'application/json'
|
|
Authorization: 'Basic {{ mesh_basic_auth }}'
|
|
timeout: 60
|
|
body_format: json
|
|
body:
|
|
name: "{{ mesh_node_name }}"
|
|
rpcUrl: "{{ mesh_node_scheme }}://{{ mesh_node_name }}.{{ stack_name }}-{{ ansible_ec2_placement_region }}.{{ atl_hostedzone }}:{{ mesh_node_port }}"
|
|
register: register_mesh_node_result
|
|
until: register_mesh_node_result is not failed
|
|
retries: 5
|
|
delay: 30
|
|
no_log: True
|
|
|
|
- name: update_mesh_node
|
|
ansible.builtin.uri:
|
|
url: '{{ atl_proxy_name }}/rest/api/latest/admin/git/mesh/nodes/{{ mesh_node_id }}'
|
|
method: PUT
|
|
headers:
|
|
Content-Type: 'application/json'
|
|
Accept: 'application/json'
|
|
Authorization: 'Basic {{ mesh_basic_auth }}'
|
|
timeout: 60
|
|
body_format: json
|
|
body:
|
|
id: "{{ mesh_node_id }}"
|
|
name: "{{ mesh_node_name }}"
|
|
rpcId: "{{ mesh_node_id }}"
|
|
rpcUrl: "{{ mesh_node_scheme }}://{{ mesh_node_name }}.{{ stack_name }}-{{ ansible_ec2_placement_region }}.{{ atl_hostedzone }}:{{ mesh_node_port }}"
|
|
register: register_mesh_node_result
|
|
until: register_mesh_node_result is not failed
|
|
retries: 5
|
|
delay: 30
|
|
no_log: True
|
|
|
|
- name: Remove orphan_vol lease_lock
|
|
ansible.builtin.file:
|
|
path: '{{ atl_shared_mountpoint }}/.{{ orphan_vol }}'
|
|
state: absent
|