--- - name: Enable Local Swarm Communications community.general.ufw: rule: allow from: "{{ homelab_network }}" state: enabled - name: Set swarm initializer variable ansible.builtin.set_fact: swarm_initializer_host: "{{ groups['swarm_cluster'][0] }}" - name: Initialize the swarm cluster on the first node when: ansible_hostname == swarm_initializer_host ansible.builtin.import_tasks: swarm_init/tasks/main.yml - name: Join the swarm cluster on all other nodes when: ansible_hostname != swarm_initializer_host ansible.builtin.import_tasks: swarm_join/tasks/main.yml - name: Login to OCI when: not homelab_build ansible.builtin.command: "docker login {{ oci_domain }} --username {{ oci_username }} --password {{ oci_password }}"