diff --git a/roles/common/handlers/main.yml b/all/common/handlers/main.yml similarity index 100% rename from roles/common/handlers/main.yml rename to all/common/handlers/main.yml diff --git a/roles/common/tasks/main.yml b/all/common/tasks/main.yml similarity index 90% rename from roles/common/tasks/main.yml rename to all/common/tasks/main.yml index 80a0aee3065e20c9cc49205bfd731170a1fc3897..6a1b3ce54361e3f7fafa89a4e58d55ac4810b07c 100644 --- a/roles/common/tasks/main.yml +++ b/all/common/tasks/main.yml @@ -25,7 +25,7 @@ - name: add sshkeys for server authorized_key: user: root - key: "{{ lookup('file', 'keyfiles/' + item + '.pub') }}" + key: "{{ lookup('file', '../keyfiles/' + item + '.pub') }}" with_items: "{{ administratorenteam }}" when: administratorenteam notify: restart sshd diff --git a/roles/common/templates/motd.j2 b/all/common/templates/motd.j2 similarity index 100% rename from roles/common/templates/motd.j2 rename to all/common/templates/motd.j2 diff --git a/roles/common/templates/sources.list.j2 b/all/common/templates/sources.list.j2 similarity index 100% rename from roles/common/templates/sources.list.j2 rename to all/common/templates/sources.list.j2 diff --git a/roles/common/templates/sshd_config.j2 b/all/common/templates/sshd_config.j2 similarity index 100% rename from roles/common/templates/sshd_config.j2 rename to all/common/templates/sshd_config.j2 diff --git a/roles/hostname/tasks/main.yml b/all/hostname/tasks/main.yml similarity index 100% rename from roles/hostname/tasks/main.yml rename to all/hostname/tasks/main.yml diff --git a/roles/hostname/templates/hostname.j2 b/all/hostname/templates/hostname.j2 similarity index 100% rename from roles/hostname/templates/hostname.j2 rename to all/hostname/templates/hostname.j2 diff --git a/all.yml b/all/main.yml similarity index 72% rename from all.yml rename to all/main.yml index d6b513b5336d655036ffcafdb79b31989fa63e50..e37a22436cb999339b4bdb4805a9809c80fc6c33 100644 --- a/all.yml +++ b/all/main.yml @@ -1,5 +1,5 @@ --- -# Playbook zur Konfiguration von allen Servern +# Globale Konfiguration für alle Server - hosts: all remote_user: root diff --git a/site.yml b/site.yml index 543a1a063aec18ba8e79df93c7a766bae297a430..fc69ae823aa802a839c1445a58933488581945c8 100644 --- a/site.yml +++ b/site.yml @@ -1,7 +1,10 @@ --- # Hauptdatei, includiert lediglich die einzelnen Playbooks -- include: all.yml -- include: vorstandspi.yml -- include: webserver.yml +- include: all/main.yml +- include: vorstandspi/main.yml +- include: webserver/main.yml + + + \ No newline at end of file diff --git a/vorstandspi.yml b/vorstandspi.yml deleted file mode 100644 index 7ffee45013bf5259a306f905295ebb02d01af26b..0000000000000000000000000000000000000000 --- a/vorstandspi.yml +++ /dev/null @@ -1,9 +0,0 @@ ---- - -- hosts: vorstandspi - remote_user: root - roles: - - { role: vorstandspi_git, tags: git } - - { role: vorstandspi_mysql, tags: mysql } - - diff --git a/roles/vorstandspi_git/handlers/main.yml b/vorstandspi/git/handlers/main.yml similarity index 100% rename from roles/vorstandspi_git/handlers/main.yml rename to vorstandspi/git/handlers/main.yml diff --git a/roles/vorstandspi_git/tasks/main.yml b/vorstandspi/git/tasks/main.yml similarity index 100% rename from roles/vorstandspi_git/tasks/main.yml rename to vorstandspi/git/tasks/main.yml diff --git a/vorstandspi/main.yml b/vorstandspi/main.yml new file mode 100644 index 0000000000000000000000000000000000000000..f490f9933a4032f2fa60c739a75d60a6ed7c481b --- /dev/null +++ b/vorstandspi/main.yml @@ -0,0 +1,9 @@ +--- + +- hosts: vorstandspi + remote_user: root + roles: + - { role: git, tags: git } + - { role: mysql, tags: mysql } + + diff --git a/roles/vorstandspi_mysql/files/my.cnf b/vorstandspi/mysql/files/my.cnf similarity index 100% rename from roles/vorstandspi_mysql/files/my.cnf rename to vorstandspi/mysql/files/my.cnf diff --git a/roles/vorstandspi_mysql/handlers/main.yml b/vorstandspi/mysql/handlers/main.yml similarity index 100% rename from roles/vorstandspi_mysql/handlers/main.yml rename to vorstandspi/mysql/handlers/main.yml diff --git a/roles/vorstandspi_mysql/tasks/main.yml b/vorstandspi/mysql/tasks/main.yml similarity index 100% rename from roles/vorstandspi_mysql/tasks/main.yml rename to vorstandspi/mysql/tasks/main.yml diff --git a/roles/docker/tasks/main.yml b/webserver/docker/tasks/main.yml similarity index 100% rename from roles/docker/tasks/main.yml rename to webserver/docker/tasks/main.yml diff --git a/roles/docker_gitlab/tasks/main.yml b/webserver/docker_gitlab/tasks/main.yml similarity index 100% rename from roles/docker_gitlab/tasks/main.yml rename to webserver/docker_gitlab/tasks/main.yml diff --git a/roles/docker_gitlab/templates/gitlab.rb b/webserver/docker_gitlab/templates/gitlab.rb similarity index 100% rename from roles/docker_gitlab/templates/gitlab.rb rename to webserver/docker_gitlab/templates/gitlab.rb diff --git a/webserver.yml b/webserver/main.yml similarity index 97% rename from webserver.yml rename to webserver/main.yml index 93d78a0c300b0998b50f0af3f11a2e95b0dfe3d1..c0e53900974b55131f718b96585c1577b907de21 100644 --- a/webserver.yml +++ b/webserver/main.yml @@ -6,4 +6,4 @@ - { role: nginx, tags: nginx } - { role: docker, tags: docker } - { role: docker_gitlab, tags: gitlab } - + \ No newline at end of file diff --git a/roles/nginx/files/default b/webserver/nginx/files/default similarity index 100% rename from roles/nginx/files/default rename to webserver/nginx/files/default diff --git a/roles/nginx/files/default-init b/webserver/nginx/files/default-init similarity index 100% rename from roles/nginx/files/default-init rename to webserver/nginx/files/default-init diff --git a/roles/nginx/files/gitlab b/webserver/nginx/files/gitlab similarity index 100% rename from roles/nginx/files/gitlab rename to webserver/nginx/files/gitlab diff --git a/roles/nginx/files/mattermost b/webserver/nginx/files/mattermost similarity index 100% rename from roles/nginx/files/mattermost rename to webserver/nginx/files/mattermost diff --git a/roles/nginx/handlers/main.yml b/webserver/nginx/handlers/main.yml similarity index 100% rename from roles/nginx/handlers/main.yml rename to webserver/nginx/handlers/main.yml diff --git a/roles/nginx/tasks/main.yml b/webserver/nginx/tasks/main.yml similarity index 100% rename from roles/nginx/tasks/main.yml rename to webserver/nginx/tasks/main.yml