So right now the yaml files are serving as the source of truth.
- Create YAML file with information per customer.
- Run Terraform to create the categories/tags in vCenter.
- Run Ansible community.vmware.vmware_tag_manager to apply the tags to the appropriate servers.
- name: Create tags
community.general.terraform:
project_path: ../../scripts/terraform
register: tag_output
- name: Terraform output
ansible.builtin.debug:
msg: "{{ tag_output }}"
- name: Terraform output
ansible.builtin.debug:
msg: "{{ tag_output.stderr_lines }}"
when: tag_output.failed
- name: Add tags
community.vmware.vmware_tag_manager:
# omitted details, but applies tags based on requirements
So that's what that looks like as far as tag management. If you think there's a better way I'm absolutely open to suggestions.
The reboot order of the servers is dictated by the vendor and their unique combination of third-party applications they run in combination. So for instance, one customer may need a shutdown order of file servers, database servers, batch servers, management servers, web servers; other may need a completely different order.
That's why I chose the YAML as the source of truth as this can change as the vendor makes updates to the application so it does need to be fairly flexible. As far as the customer is concerned, this is considered just a generic "downtime" for patching, application updates, whatever is needed.
So to answer use your phone analogy:
****riiiiiinnggggg****
Customer: Hi, application needs to be updated. Can we schedule a downtime for this date and time?
Admin: Why certainly.
--Date and Time Arrives--
Vendor will perform work needed while users are locked out of the system.
Admin will then shutdown servers (perhaps applying patches at the same time) and then bring the servers back up.
Vendor will then unlock the application to end users and go on their way.
Right now, the reboot order is managed via a CSV spreadsheet and a nightmare-ish PowerShell script. The CSV "source of truth" holds the same information I have above in the YAML file: server name, shutdown group, powerup group, and vcenter host. Effective but very difficult to maintain or add new functionality without a complete rewrite.
So the steps and what order are predetermined by whatever source of truth, CSV/YAML/etc.
I hope that gives some more context and happy to answer any additional questions.