From fb5bb177ca8e95400747d63e737c684ff357c634 Mon Sep 17 00:00:00 2001 From: Jef Roosens Date: Sat, 18 Dec 2021 10:30:44 +0100 Subject: [PATCH] Moved ansible stuff to own folder --- bootstrap.yml => ansible/bootstrap.yml | 0 .../hosts.template.ini | 0 main.yml => ansible/main.yml | 0 .../roles}/configure-ssh/files/sshd_config | 0 .../roles}/configure-ssh/handlers/main.yml | 0 .../roles}/configure-ssh/tasks/main.yml | 0 .../create-debian-user/files/authorized_keys | 0 .../roles}/create-debian-user/tasks/main.yml | 0 .../docker-swarm-add-manager/tasks/main.yml | 0 .../docker-swarm-add-worker/tasks/main.yml | 0 .../roles}/docker-swarm-init/tasks/main.yml | 0 .../roles}/docker/files/daemon.json | 0 .../roles}/docker/handlers/main.yml | 0 .../roles}/docker/tasks/main.yml | 0 .../install-base-packages/tasks/main.yml | 0 .../roles}/networking/tasks/main.yml | 0 .../roles}/portainer-deploy/handlers/main.yml | 0 .../roles}/portainer-deploy/tasks/main.yml | 0 .../templates/portainer-stack.yml.j2 | 1 + .../roles}/set-hostname/handlers/main.yml | 0 .../roles}/set-hostname/hosts.j2 | 0 .../roles}/set-hostname/tasks/main.yml | 0 .../roles}/sysctl/files/sysctl.conf | 0 .../roles}/sysctl/handlers/main.yml | 0 .../roles}/sysctl/tasks/main.yml | 0 .../roles}/traefik-deploy/handlers/main.yml | 0 .../roles}/traefik-deploy/tasks/main.yml | 0 .../templates/traefik-stack.yml.j2 | 0 .../traefik-deploy/templates/traefik.yml.j2 | 0 .../roles}/update/files/sources.list | 0 .../roles}/update/tasks/main.yml | 0 update.yml => ansible/update.yml | 0 vagrant.hosts.ini | 22 ------------------- 33 files changed, 1 insertion(+), 22 deletions(-) rename bootstrap.yml => ansible/bootstrap.yml (100%) rename hosts.template.ini => ansible/hosts.template.ini (100%) rename main.yml => ansible/main.yml (100%) rename {roles => ansible/roles}/configure-ssh/files/sshd_config (100%) rename {roles => ansible/roles}/configure-ssh/handlers/main.yml (100%) rename {roles => ansible/roles}/configure-ssh/tasks/main.yml (100%) rename {roles => ansible/roles}/create-debian-user/files/authorized_keys (100%) rename {roles => ansible/roles}/create-debian-user/tasks/main.yml (100%) rename {roles => ansible/roles}/docker-swarm-add-manager/tasks/main.yml (100%) rename {roles => ansible/roles}/docker-swarm-add-worker/tasks/main.yml (100%) rename {roles => ansible/roles}/docker-swarm-init/tasks/main.yml (100%) rename {roles => ansible/roles}/docker/files/daemon.json (100%) rename {roles => ansible/roles}/docker/handlers/main.yml (100%) rename {roles => ansible/roles}/docker/tasks/main.yml (100%) rename {roles => ansible/roles}/install-base-packages/tasks/main.yml (100%) rename {roles => ansible/roles}/networking/tasks/main.yml (100%) rename {roles => ansible/roles}/portainer-deploy/handlers/main.yml (100%) rename {roles => ansible/roles}/portainer-deploy/tasks/main.yml (100%) rename {roles => ansible/roles}/portainer-deploy/templates/portainer-stack.yml.j2 (95%) rename {roles => ansible/roles}/set-hostname/handlers/main.yml (100%) rename {roles => ansible/roles}/set-hostname/hosts.j2 (100%) rename {roles => ansible/roles}/set-hostname/tasks/main.yml (100%) rename {roles => ansible/roles}/sysctl/files/sysctl.conf (100%) rename {roles => ansible/roles}/sysctl/handlers/main.yml (100%) rename {roles => ansible/roles}/sysctl/tasks/main.yml (100%) rename {roles => ansible/roles}/traefik-deploy/handlers/main.yml (100%) rename {roles => ansible/roles}/traefik-deploy/tasks/main.yml (100%) rename {roles => ansible/roles}/traefik-deploy/templates/traefik-stack.yml.j2 (100%) rename {roles => ansible/roles}/traefik-deploy/templates/traefik.yml.j2 (100%) rename {roles => ansible/roles}/update/files/sources.list (100%) rename {roles => ansible/roles}/update/tasks/main.yml (100%) rename update.yml => ansible/update.yml (100%) delete mode 100644 vagrant.hosts.ini diff --git a/bootstrap.yml b/ansible/bootstrap.yml similarity index 100% rename from bootstrap.yml rename to ansible/bootstrap.yml diff --git a/hosts.template.ini b/ansible/hosts.template.ini similarity index 100% rename from hosts.template.ini rename to ansible/hosts.template.ini diff --git a/main.yml b/ansible/main.yml similarity index 100% rename from main.yml rename to ansible/main.yml diff --git a/roles/configure-ssh/files/sshd_config b/ansible/roles/configure-ssh/files/sshd_config similarity index 100% rename from roles/configure-ssh/files/sshd_config rename to ansible/roles/configure-ssh/files/sshd_config diff --git a/roles/configure-ssh/handlers/main.yml b/ansible/roles/configure-ssh/handlers/main.yml similarity index 100% rename from roles/configure-ssh/handlers/main.yml rename to ansible/roles/configure-ssh/handlers/main.yml diff --git a/roles/configure-ssh/tasks/main.yml b/ansible/roles/configure-ssh/tasks/main.yml similarity index 100% rename from roles/configure-ssh/tasks/main.yml rename to ansible/roles/configure-ssh/tasks/main.yml diff --git a/roles/create-debian-user/files/authorized_keys b/ansible/roles/create-debian-user/files/authorized_keys similarity index 100% rename from roles/create-debian-user/files/authorized_keys rename to ansible/roles/create-debian-user/files/authorized_keys diff --git a/roles/create-debian-user/tasks/main.yml b/ansible/roles/create-debian-user/tasks/main.yml similarity index 100% rename from roles/create-debian-user/tasks/main.yml rename to ansible/roles/create-debian-user/tasks/main.yml diff --git a/roles/docker-swarm-add-manager/tasks/main.yml b/ansible/roles/docker-swarm-add-manager/tasks/main.yml similarity index 100% rename from roles/docker-swarm-add-manager/tasks/main.yml rename to ansible/roles/docker-swarm-add-manager/tasks/main.yml diff --git a/roles/docker-swarm-add-worker/tasks/main.yml b/ansible/roles/docker-swarm-add-worker/tasks/main.yml similarity index 100% rename from roles/docker-swarm-add-worker/tasks/main.yml rename to ansible/roles/docker-swarm-add-worker/tasks/main.yml diff --git a/roles/docker-swarm-init/tasks/main.yml b/ansible/roles/docker-swarm-init/tasks/main.yml similarity index 100% rename from roles/docker-swarm-init/tasks/main.yml rename to ansible/roles/docker-swarm-init/tasks/main.yml diff --git a/roles/docker/files/daemon.json b/ansible/roles/docker/files/daemon.json similarity index 100% rename from roles/docker/files/daemon.json rename to ansible/roles/docker/files/daemon.json diff --git a/roles/docker/handlers/main.yml b/ansible/roles/docker/handlers/main.yml similarity index 100% rename from roles/docker/handlers/main.yml rename to ansible/roles/docker/handlers/main.yml diff --git a/roles/docker/tasks/main.yml b/ansible/roles/docker/tasks/main.yml similarity index 100% rename from roles/docker/tasks/main.yml rename to ansible/roles/docker/tasks/main.yml diff --git a/roles/install-base-packages/tasks/main.yml b/ansible/roles/install-base-packages/tasks/main.yml similarity index 100% rename from roles/install-base-packages/tasks/main.yml rename to ansible/roles/install-base-packages/tasks/main.yml diff --git a/roles/networking/tasks/main.yml b/ansible/roles/networking/tasks/main.yml similarity index 100% rename from roles/networking/tasks/main.yml rename to ansible/roles/networking/tasks/main.yml diff --git a/roles/portainer-deploy/handlers/main.yml b/ansible/roles/portainer-deploy/handlers/main.yml similarity index 100% rename from roles/portainer-deploy/handlers/main.yml rename to ansible/roles/portainer-deploy/handlers/main.yml diff --git a/roles/portainer-deploy/tasks/main.yml b/ansible/roles/portainer-deploy/tasks/main.yml similarity index 100% rename from roles/portainer-deploy/tasks/main.yml rename to ansible/roles/portainer-deploy/tasks/main.yml diff --git a/roles/portainer-deploy/templates/portainer-stack.yml.j2 b/ansible/roles/portainer-deploy/templates/portainer-stack.yml.j2 similarity index 95% rename from roles/portainer-deploy/templates/portainer-stack.yml.j2 rename to ansible/roles/portainer-deploy/templates/portainer-stack.yml.j2 index 411d3d9..c357d3d 100644 --- a/roles/portainer-deploy/templates/portainer-stack.yml.j2 +++ b/ansible/roles/portainer-deploy/templates/portainer-stack.yml.j2 @@ -19,6 +19,7 @@ services: - 'traefik.http.services.portainer.loadbalancer.server.port=9000' - 'traefik.http.routers.portainer.tls=true' - 'traefik.http.routers.portainer.tls.certresolver=letsEncrypt' + - 'traefik.http.middlewares.portainer.compress=true' networks: - default diff --git a/roles/set-hostname/handlers/main.yml b/ansible/roles/set-hostname/handlers/main.yml similarity index 100% rename from roles/set-hostname/handlers/main.yml rename to ansible/roles/set-hostname/handlers/main.yml diff --git a/roles/set-hostname/hosts.j2 b/ansible/roles/set-hostname/hosts.j2 similarity index 100% rename from roles/set-hostname/hosts.j2 rename to ansible/roles/set-hostname/hosts.j2 diff --git a/roles/set-hostname/tasks/main.yml b/ansible/roles/set-hostname/tasks/main.yml similarity index 100% rename from roles/set-hostname/tasks/main.yml rename to ansible/roles/set-hostname/tasks/main.yml diff --git a/roles/sysctl/files/sysctl.conf b/ansible/roles/sysctl/files/sysctl.conf similarity index 100% rename from roles/sysctl/files/sysctl.conf rename to ansible/roles/sysctl/files/sysctl.conf diff --git a/roles/sysctl/handlers/main.yml b/ansible/roles/sysctl/handlers/main.yml similarity index 100% rename from roles/sysctl/handlers/main.yml rename to ansible/roles/sysctl/handlers/main.yml diff --git a/roles/sysctl/tasks/main.yml b/ansible/roles/sysctl/tasks/main.yml similarity index 100% rename from roles/sysctl/tasks/main.yml rename to ansible/roles/sysctl/tasks/main.yml diff --git a/roles/traefik-deploy/handlers/main.yml b/ansible/roles/traefik-deploy/handlers/main.yml similarity index 100% rename from roles/traefik-deploy/handlers/main.yml rename to ansible/roles/traefik-deploy/handlers/main.yml diff --git a/roles/traefik-deploy/tasks/main.yml b/ansible/roles/traefik-deploy/tasks/main.yml similarity index 100% rename from roles/traefik-deploy/tasks/main.yml rename to ansible/roles/traefik-deploy/tasks/main.yml diff --git a/roles/traefik-deploy/templates/traefik-stack.yml.j2 b/ansible/roles/traefik-deploy/templates/traefik-stack.yml.j2 similarity index 100% rename from roles/traefik-deploy/templates/traefik-stack.yml.j2 rename to ansible/roles/traefik-deploy/templates/traefik-stack.yml.j2 diff --git a/roles/traefik-deploy/templates/traefik.yml.j2 b/ansible/roles/traefik-deploy/templates/traefik.yml.j2 similarity index 100% rename from roles/traefik-deploy/templates/traefik.yml.j2 rename to ansible/roles/traefik-deploy/templates/traefik.yml.j2 diff --git a/roles/update/files/sources.list b/ansible/roles/update/files/sources.list similarity index 100% rename from roles/update/files/sources.list rename to ansible/roles/update/files/sources.list diff --git a/roles/update/tasks/main.yml b/ansible/roles/update/tasks/main.yml similarity index 100% rename from roles/update/tasks/main.yml rename to ansible/roles/update/tasks/main.yml diff --git a/update.yml b/ansible/update.yml similarity index 100% rename from update.yml rename to ansible/update.yml diff --git a/vagrant.hosts.ini b/vagrant.hosts.ini deleted file mode 100644 index b8a7fe8..0000000 --- a/vagrant.hosts.ini +++ /dev/null @@ -1,22 +0,0 @@ -# This file should only contain static IPs. Dynamic IPs should be defined in -# originals.ini. - -# The admin is the main host that initializes the swarm -admin ansible_host=192.168.56.5 hostname=alpha - -[managers] - -[workers] -192.168.56.6 hostname=beta -192.168.56.7 hostname=gamma - -[all:vars] -ansible_ssh_user=debian -ansible_ssh_port=2222 -ansible_become_pass=pass -; ansible_ssh_private_key_file=~/.vagrant.d/insecure_private_key -debian_pass=pass - -portainer_version=2.11.0 -portainer_domain=192.168.56.5 -letsencrypt_email=roosensjef@gmail.com