From 3ae83d77c1178380ced8e07efec6d7058c9643b2 Mon Sep 17 00:00:00 2001 From: Christian Elberfeld <elberfeld@web.de> Date: Thu, 17 Mar 2016 13:57:03 +0100 Subject: [PATCH] verzeichnisse restrukturiert --- {roles => all}/common/handlers/main.yml | 0 {roles => all}/common/tasks/main.yml | 2 +- {roles => all}/common/templates/motd.j2 | 0 {roles => all}/common/templates/sources.list.j2 | 0 {roles => all}/common/templates/sshd_config.j2 | 0 {roles => all}/hostname/tasks/main.yml | 0 {roles => all}/hostname/templates/hostname.j2 | 0 all.yml => all/main.yml | 2 +- site.yml | 9 ++++++--- vorstandspi.yml | 9 --------- .../git}/handlers/main.yml | 0 .../vorstandspi_git => vorstandspi/git}/tasks/main.yml | 0 vorstandspi/main.yml | 9 +++++++++ .../vorstandspi_mysql => vorstandspi/mysql}/files/my.cnf | 0 .../mysql}/handlers/main.yml | 0 .../mysql}/tasks/main.yml | 0 {roles => webserver}/docker/tasks/main.yml | 0 {roles => webserver}/docker_gitlab/tasks/main.yml | 0 {roles => webserver}/docker_gitlab/templates/gitlab.rb | 0 webserver.yml => webserver/main.yml | 2 +- {roles => webserver}/nginx/files/default | 0 {roles => webserver}/nginx/files/default-init | 0 {roles => webserver}/nginx/files/gitlab | 0 {roles => webserver}/nginx/files/mattermost | 0 {roles => webserver}/nginx/handlers/main.yml | 0 {roles => webserver}/nginx/tasks/main.yml | 0 26 files changed, 18 insertions(+), 15 deletions(-) rename {roles => all}/common/handlers/main.yml (100%) rename {roles => all}/common/tasks/main.yml (90%) rename {roles => all}/common/templates/motd.j2 (100%) rename {roles => all}/common/templates/sources.list.j2 (100%) rename {roles => all}/common/templates/sshd_config.j2 (100%) rename {roles => all}/hostname/tasks/main.yml (100%) rename {roles => all}/hostname/templates/hostname.j2 (100%) rename all.yml => all/main.yml (72%) delete mode 100644 vorstandspi.yml rename {roles/vorstandspi_git => vorstandspi/git}/handlers/main.yml (100%) rename {roles/vorstandspi_git => vorstandspi/git}/tasks/main.yml (100%) create mode 100644 vorstandspi/main.yml rename {roles/vorstandspi_mysql => vorstandspi/mysql}/files/my.cnf (100%) rename {roles/vorstandspi_mysql => vorstandspi/mysql}/handlers/main.yml (100%) rename {roles/vorstandspi_mysql => vorstandspi/mysql}/tasks/main.yml (100%) rename {roles => webserver}/docker/tasks/main.yml (100%) rename {roles => webserver}/docker_gitlab/tasks/main.yml (100%) rename {roles => webserver}/docker_gitlab/templates/gitlab.rb (100%) rename webserver.yml => webserver/main.yml (97%) rename {roles => webserver}/nginx/files/default (100%) rename {roles => webserver}/nginx/files/default-init (100%) rename {roles => webserver}/nginx/files/gitlab (100%) rename {roles => webserver}/nginx/files/mattermost (100%) rename {roles => webserver}/nginx/handlers/main.yml (100%) rename {roles => webserver}/nginx/tasks/main.yml (100%) 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 80a0aee3..6a1b3ce5 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 d6b513b5..e37a2243 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 543a1a06..fc69ae82 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 7ffee450..00000000 --- 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 00000000..f490f993 --- /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 93d78a0c..c0e53900 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 -- GitLab