diff options
author | Elizabeth Hunt <me@liz.coffee> | 2025-05-04 00:10:22 -0700 |
---|---|---|
committer | Elizabeth Hunt <me@liz.coffee> | 2025-05-04 00:35:51 -0700 |
commit | c3e9305bce9fd1aaf165779fb46570c683750e6f (patch) | |
tree | dcc01e3d35abd0647f7a053a00d9e3f1f91072d1 /playbooks/swarm_cluster.yml | |
parent | 7106b304324b3a7c4dc5fa25432f08041cbc41cb (diff) | |
download | infra-c3e9305bce9fd1aaf165779fb46570c683750e6f.tar.gz infra-c3e9305bce9fd1aaf165779fb46570c683750e6f.zip |
Tried to use docker ingress to solve x-real-ip on mail daemon but it didn't work for other ports
Diffstat (limited to 'playbooks/swarm_cluster.yml')
-rw-r--r-- | playbooks/swarm_cluster.yml | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/playbooks/swarm_cluster.yml b/playbooks/swarm_cluster.yml new file mode 100644 index 0000000..6a13f8c --- /dev/null +++ b/playbooks/swarm_cluster.yml @@ -0,0 +1,24 @@ +--- + +- name: Configure Docker Swarm Firewall Rules + hosts: swarm + become: true + tasks: + - name: Enable Local Swarm Communications + community.general.ufw: + rule: allow + from: "{{ homelab_network }}" + state: enabled + +- name: Setup swarm on init node + hosts: swarm[0] + become: true + roles: + - swarm_init + +- name: Join non-init nodes + hosts: swarm:!swarm[0] + become: true + roles: + - swarm_join + |