debugging; try removing/simplifying these tasks and conditionals

This commit is contained in:
Lee Goolsbee
2024-03-27 15:14:40 -05:00
parent 47589f03a9
commit a050987e3c
2 changed files with 8 additions and 21 deletions

View File

@@ -64,36 +64,23 @@
- new_meshvol_from_snap is defined
- new_meshvol_from_snap | bool
# 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:
mesh_node_id: "{{ lookup('ansible.builtin.ini', 'node.id type=properties file={{ mesh_properties_file }}', errors='ignore') | default('absent', true) }}"
# 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
ansible.builtin.set_fact:
mesh_clone_firstrun: true
when: mesh_node_id == 'absent'
mesh_node_id: "{{ lookup('ansible.builtin.ini', 'node.id type=properties file={{ mesh_properties_file }}') }}"
ignore_errors: yes
# 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
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
when: (mesh_node_name is not defined) or (mesh_node_name | length == 0) or (mesh_node_id is not defined) or (mesh_node_id | length == 0)
# bundle all the node_name releated updates together
# bundle all the node_name related updates together
- 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
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
ansible.builtin.import_tasks:

View File

@@ -25,7 +25,7 @@
when:
- bitbucket_cluster_available
- mesh_nodes_report.json | community.general.json_query(query) | length == 0
- (mesh_node_id is defined) and (mesh_node_id|length > 0)
- (mesh_node_id is defined) and (mesh_node_id | length > 0)
vars:
query: "[?name=='{{ mesh_node_name }}']"
@@ -40,7 +40,7 @@
when:
- bitbucket_cluster_available
- mesh_nodes_report.json | community.general.json_query(query) | length == 0
- (mesh_node_id is not defined) or (mesh_node_id|length == 0)
- (mesh_node_id is not defined) or (mesh_node_id | length == 0)
vars:
query: "[?name=='{{ mesh_node_name }}']"
@@ -53,6 +53,6 @@
when:
- bitbucket_cluster_available
- mesh_nodes_report.json | community.general.json_query(query) | length == 0
- (mesh_node_id is not defined) or (mesh_node_id|length == 0)
- (mesh_node_id is not defined) or (mesh_node_id | length == 0)
vars:
query: "[?id=='{{ mesh_node_id }}']"