diff --git a/.gitmodules b/.gitmodules index 50ec197..8ac5df5 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,18 +1,27 @@ [submodule "nfs"] path = roles/nfs url = https://github.com/geerlingguy/ansible-role-nfs.git [submodule "roles/jenkins"] path = roles/jenkins url = https://github.com/ICTO/ansible-jenkins.git [submodule "roles/swap"] path = roles/swap url = https://github.com/tribou/ansible-swap.git [submodule "roles/sensu"] path = roles/sensu url = https://github.com/picotrading/ansible-sensu.git [submodule "roles/yumrepo"] path = roles/yumrepo url = https://github.com/picotrading/ansible-yumrepo.git [submodule "templates/encoder"] path = templates/encoder url = https://github.com/picotrading/config-encoder-macros +[submodule "roles/rabbitmq"] + path = roles/rabbitmq + url = https://github.com/picotrading/ansible-rabbitmq.git +[submodule "roles/uchiwa"] + path = roles/uchiwa + url = https://github.com/picotrading/ansible-uchiwa.git +[submodule "roles/redis"] + path = roles/redis + url = https://github.com/picotrading/ansible-redis.git diff --git a/Makefile b/Makefile index fdf1e86..99c822d 100644 --- a/Makefile +++ b/Makefile @@ -1,12 +1,15 @@ # vim: set noexpandtab: status: nova list up: ansible-playbook main.yml +up-no-common: + ansible-playbook main.yml --skip-tags "common" + test: ansible-playbook test.yml clean: ansible-playbook cleanup.yml diff --git a/main.yml b/main.yml index d6afcec..0f5df4b 100644 --- a/main.yml +++ b/main.yml @@ -1,91 +1,99 @@ --- - name: Create Instances hosts: 127.0.0.1 connection: local gather_facts: false vars_files: - "vars/main.yml" tasks: - include: tasks/create-instances.yml - name: Configure Jump Server hosts: lbs vars_files: - "vars/main.yml" user: centos sudo: yes roles: - role: common + tags: [ 'common' ] - role: swap/roles/swap + tags: [ 'common' ] - role: nfs nfs_server_daemon: nfs-server # doesn't work as it's in vars not default - role: ganglia-gmond - role: haproxy - role: jump handlers: - include: handlers/main.yml - name: Configure Monitoring Server hosts: monit vars_files: - "vars/main.yml" user: centos sudo: yes roles: - role: common + tags: [ 'common' ] - role: swap/roles/swap - { role: nginx, nginx_config: nginx-ganglia.conf } - role: ganglia-gmond - role: ganglia-gmetad handlers: - include: handlers/main.yml - name: Configure Databases hosts: dbs vars_files: - "vars/main.yml" user: centos sudo: yes roles: - role: common + tags: [ 'common' ] - role: swap/roles/swap + tags: [ 'common' ] - role: ganglia-gmond - role: galera handlers: - include: handlers/main.yml - name: Configure App hosts: app vars_files: - "vars/main.yml" user: centos sudo: yes roles: - role: common + tags: [ 'common' ] - role: swap/roles/swap - { role: nginx, nginx_config: nginx-phabricator.conf } - role: phabricator - role: ganglia-gmond handlers: - include: handlers/main.yml #- name: Configure Jenkins # hosts: ci # vars_files: # - "vars/main.yml" # user: centos # sudo: yes # roles: # - role: common +# tags: [ 'common' ] # - role: swap/roles/swap +# tags: [ 'common' ] # - role: ganglia-gmond # - role: jenkins # plugins: # - 'ldap' # - 'preSCMbuildstep' # prefix: '/build' # email: # smtp_host: 'mail.epfl.ch' # smtp_ssl: 'true' # default_email_suffix: '@epfl.ch' # diff --git a/roles/nginx/templates/nginx-ganglia.conf b/roles/nginx/templates/nginx-monit.conf similarity index 100% rename from roles/nginx/templates/nginx-ganglia.conf rename to roles/nginx/templates/nginx-monit.conf diff --git a/roles/rabbitmq b/roles/rabbitmq new file mode 160000 index 0000000..6419af2 --- /dev/null +++ b/roles/rabbitmq @@ -0,0 +1 @@ +Subproject commit 6419af263f0c37de8fdeca8e187920fa7a0761e2 diff --git a/roles/redis b/roles/redis new file mode 160000 index 0000000..941c003 --- /dev/null +++ b/roles/redis @@ -0,0 +1 @@ +Subproject commit 941c00383c26cdd105ca8532b0c332590c0c27ae diff --git a/roles/uchiwa b/roles/uchiwa new file mode 160000 index 0000000..ef28c4c --- /dev/null +++ b/roles/uchiwa @@ -0,0 +1 @@ +Subproject commit ef28c4c2c797a1cd85db4ff4ff83584a53175edb