mirror of
https://bitbucket.org/atlassian/dc-deployments-automation.git
synced 2025-12-15 09:23:06 -06:00
task name, comments, and other general formatting updates
This commit is contained in:
@@ -10,25 +10,25 @@
|
||||
|
||||
# assume bbdc secret exists (else fail) - setup stuff for calling bitbucket rest api and get mesh node report
|
||||
# get the registered mesh node info as we need it for determining nodenames
|
||||
- name: Import bitbucket api setup pieces and do initial mesh node_report
|
||||
- name: Import Bitbucket API setup pieces
|
||||
ansible.builtin.import_tasks:
|
||||
file: bitbucket_api_setup.yml
|
||||
|
||||
- name: import/run mesh_node_report
|
||||
- name: Import and run mesh_node_report
|
||||
ansible.builtin.import_tasks:
|
||||
file: mesh_node_report.yml
|
||||
|
||||
- name: set fact if this stack is a mesh clone
|
||||
- name: Set fact if this stack is a mesh clone
|
||||
ansible.builtin.set_fact:
|
||||
mesh_clone: "{{ (atl_mesh_snapshot_az1 is defined) | ternary(true, false) }}"
|
||||
|
||||
# workout if there is a valid mesh_vol, either mounted or abandoned, set mesh_vol or mesh_snap
|
||||
- name: check for valid mesh_vol
|
||||
- name: Check for valid mesh_vol
|
||||
ansible.builtin.import_tasks:
|
||||
file: meshvol_check.yml
|
||||
|
||||
# create/set mesh_vol if still needed
|
||||
- name: create/set mesh_vol if still needed
|
||||
- name: Create/set mesh_vol if still needed
|
||||
ansible.builtin.import_tasks:
|
||||
file: meshvol_create.yml
|
||||
when:
|
||||
@@ -36,7 +36,7 @@
|
||||
|
||||
# ensure logs and cache have fs and are mounted
|
||||
# action this block when mesh volume is not in mount list
|
||||
- name: setup and mount mesh releated filesystems
|
||||
- name: Setup and mount mesh releated filesystems
|
||||
ansible.builtin.import_tasks:
|
||||
file: meshvols_setup.yml
|
||||
when:
|
||||
@@ -44,26 +44,26 @@
|
||||
- "'/dev/xvdd' not in devices_list"
|
||||
|
||||
# Setup Mesh product
|
||||
- name: setup mesh product and related pieces
|
||||
- name: Setup mesh product and related pieces
|
||||
ansible.builtin.import_tasks:
|
||||
file: mesh_setup.yml
|
||||
|
||||
# get tag info of mesh_vol
|
||||
- name: get info of attached mesh_vol
|
||||
- name: Retrieve info of attached mesh_vol
|
||||
amazon.aws.ec2_vol_info:
|
||||
region: "{{ ansible_ec2_placement_region }}"
|
||||
filters:
|
||||
volume-id: "{{ mesh_vol }}"
|
||||
register: mesh_vol_tag_info
|
||||
register: mesh_vol_info
|
||||
tags: notest # doesn't work in molecule
|
||||
|
||||
- name: set mesh_node_name_tag var from the mesh_node_name tag of .mesh_vol
|
||||
- name: Set mesh_node_name_tag var from the mesh_node_name tag of mesh_vol
|
||||
ansible.builtin.set_fact:
|
||||
mesh_node_name: "{{ mesh_vol_tag_info.volumes[0].tags['mesh_node_name'] }}"
|
||||
mesh_node_name: "{{ mesh_vol_info.volumes[0].tags['mesh_node_name'] }}"
|
||||
ignore_errors: yes
|
||||
|
||||
# workout if we are a clone_firstrun
|
||||
- name: remove node_id from mesh.properties if new_meshvol_from_snap
|
||||
- name: Remove node.id from mesh.properties if mesh volume was re-hydrated from snapshot
|
||||
ansible.builtin.lineinfile:
|
||||
path: "{{ mesh_properties_file }}"
|
||||
regexp: '^node\.id.+$'
|
||||
@@ -72,41 +72,41 @@
|
||||
- new_meshvol_from_snap is defined
|
||||
- new_meshvol_from_snap | bool
|
||||
|
||||
- name: set mesh_node_id var from the existing mesh.properties file
|
||||
- name: Set mesh_node_id var from the existing mesh.properties file
|
||||
ansible.builtin.set_fact:
|
||||
mesh_node_id: "{{ lookup('ansible.builtin.ini', 'node.id type=properties file={{ mesh_properties_file }}', errors='ignore' )| default('absent', true) }}"
|
||||
mesh_node_id: "{{ lookup('ansible.builtin.ini', 'node.id type=properties file={{ mesh_properties_file }}', errors='ignore') | default('absent', true) }}"
|
||||
|
||||
- name: set string to test mesh_clone_firstrun (node_name contains meshnode_{{ mesh_node_id }}")
|
||||
- name: Set string to test mesh_clone_firstrun (node_name contains meshnode_{{ mesh_node_id }}")
|
||||
ansible.builtin.set_fact:
|
||||
mesh_clone_teststring: "meshnode_{{ mesh_node_id }}"
|
||||
|
||||
# workout if this is mesh_clone_firstrun - either no mounted volume or teststring found in mesh_nodes_report
|
||||
- name: work out if this is firstrun of a mesh_clone
|
||||
# workout if this is mesh_clone_firstrun
|
||||
- name: Work out if this is first_run of a mesh_clone
|
||||
ansible.builtin.set_fact:
|
||||
mesh_clone_firstrun: false
|
||||
|
||||
- name: set firstrun true if mesh_node_id is absent
|
||||
- name: Set firstrun true if mesh_node_id is absent
|
||||
ansible.builtin.set_fact:
|
||||
mesh_clone_firstrun: true
|
||||
when: mesh_node_id == 'absent'
|
||||
|
||||
# if meshvol has no petname or this is the first run of a clone, create a new petname, tag the vol and set mesh_node_name
|
||||
- name: new petname related processing
|
||||
- name: New petname related processing
|
||||
ansible.builtin.import_tasks:
|
||||
file: mesh_newpet.yml
|
||||
when: (mesh_node_name is not defined) or (mesh_node_name | length == 0) or mesh_clone_firstrun
|
||||
|
||||
# bundle all the node_name releated updates together
|
||||
- name: mesh_node_name related processing
|
||||
- name: Process mesh_node_name related tasks
|
||||
ansible.builtin.import_tasks:
|
||||
file: mesh_node_name.yml
|
||||
|
||||
# handle reregistering the correct node if node.id exists
|
||||
- name: set mesh_node_id var from the existing mesh.properties file
|
||||
- name: Set mesh_node_id var from the existing mesh.properties file
|
||||
ansible.builtin.set_fact:
|
||||
mesh_node_id: "{{ lookup('ansible.builtin.ini', 'node.id type=properties file={{ mesh_properties_file }}') | split('.') | first }}"
|
||||
|
||||
# handle functionality relating to starting and registering the mesh service
|
||||
- name: mesh service related processing
|
||||
- name: Mesh service related processing
|
||||
ansible.builtin.import_tasks:
|
||||
file: mesh_service.yml
|
||||
|
||||
Reference in New Issue
Block a user