This Ansible collection provides roles to manage Windows failover clusters. It includes four primary roles designed to simplify the process of setting up and managing Windows clusters, which are:
-
ad_computer_registration
: This role is used for registering computers in Active Directory (AD). For more information, refer to the role's documentation within its directory. -
failover
: This role creates a failover cluster and joins both primary and secondary systems. It requires an AD Controller, domain admin credentials, and the systems to be already joined to the domain. Thefailover_common
role must have been run on all nodes before using this role. For more details, check out theREADME.md
file in the role's directory. -
failover_common
: This role implements prerequisite steps for failover cluster for all nodes. It ensures that necessary features and services are installed and configured on your system to support a Windows failover cluster. Refer to itsREADME.md
for more information. -
join_domain
: This role is used for joining the system to a domain. It requires an AD Controller and domain admin credentials. To learn more about this role, refer to itsREADME.md
.
This section provides a guide on how to build and publish this collection to the Ansible Galaxy.
- Navigate to the root directory of your local repository where
galaxy.yml
is located. - Run the following command to build the collection:
ansible-galaxy collection build
- Navigate to the root directory of your local repository where
galaxy.yml
is located. - Run the following command to publish the collection:
ansible-galaxy collection publish oatakan-windows_cluster-1.0.0.tar.gz
To use these roles in your Ansible playbooks, follow these steps:
-
Install the collection locally using the command:
ansible-galaxy collection install oatakan.windows_cluster -p ./collections
-
Include the desired role in your playbook like this:
---
- name: setup windows cluster
hosts: all
roles:
- oatakan.windows_cluster.failover_common
- hosts: primary_server
roles:
- role: oatakan.windows_cluster.failover
first_node: true
- hosts: secondary_server
roles:
- role: oatakan.windows_cluster.failover
first_node: false