Commit 357f7e3b by Joseph Mulloy

Change tags to work with docker

parent 6f3f24fd
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
tags: tags:
- "hugepages" - "hugepages"
- "install" - "install"
- "install:system-requirements" - "install:configuration"
- name: Enable/start disable transparent huge pages service (http://docs.mongodb.org/manual/tutorial/transparent-huge-pages/) - name: Enable/start disable transparent huge pages service (http://docs.mongodb.org/manual/tutorial/transparent-huge-pages/)
service: service:
...@@ -18,8 +18,8 @@ ...@@ -18,8 +18,8 @@
state: started state: started
tags: tags:
- "hugepages" - "hugepages"
- "install" - "manage"
- "install:system-requirements" - "manage:start"
- name: install python pymongo for mongo_user ansible module - name: install python pymongo for mongo_user ansible module
pip: pip:
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
extra_args: "-i {{ COMMON_PYPI_MIRROR_URL }}" extra_args: "-i {{ COMMON_PYPI_MIRROR_URL }}"
tags: tags:
- "install" - "install"
- "install:system-requirements" - "install:app-requirements"
- name: add the mongodb signing key - name: add the mongodb signing key
apt_key: apt_key:
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
state: present state: present
tags: tags:
- "install" - "install"
- "install:system-requirements" - "install:app-requirements"
- name: add the mongodb repo to the sources list - name: add the mongodb repo to the sources list
apt_repository: apt_repository:
...@@ -46,7 +46,8 @@ ...@@ -46,7 +46,8 @@
state: present state: present
tags: tags:
- "install" - "install"
- "install:system-requirements" - "install:app-requirements"
- "mongo_packages"
- name: install mongo server and recommends - name: install mongo server and recommends
apt: apt:
...@@ -57,9 +58,9 @@ ...@@ -57,9 +58,9 @@
update_cache: yes update_cache: yes
with_items: "{{ mongodb_debian_pkgs }}" with_items: "{{ mongodb_debian_pkgs }}"
tags: tags:
- install - "install"
- install:app-requirements - "install:app-requirements"
- mongo_packages - "mongo_packages"
- name: create mongo dirs - name: create mongo dirs
file: file:
...@@ -74,7 +75,7 @@ ...@@ -74,7 +75,7 @@
- "{{ mongo_journal_dir }}" - "{{ mongo_journal_dir }}"
tags: tags:
- "install" - "install"
- "install:configuration" - "install:app-configuration"
- name: add serverStatus logging script - name: add serverStatus logging script
template: template:
...@@ -86,7 +87,7 @@ ...@@ -86,7 +87,7 @@
when: MONGO_LOG_SERVERSTATUS when: MONGO_LOG_SERVERSTATUS
tags: tags:
- "install" - "install"
- "install:configuration" - "install:app-configuration"
- name: add serverStatus logging script to cron - name: add serverStatus logging script to cron
cron: cron:
...@@ -97,7 +98,7 @@ ...@@ -97,7 +98,7 @@
when: MONGO_LOG_SERVERSTATUS when: MONGO_LOG_SERVERSTATUS
tags: tags:
- "install" - "install"
- "install:configuration" - "install:app-configuration"
# This will error when run on a new replica set, so we ignore_errors # This will error when run on a new replica set, so we ignore_errors
# and connect anonymously next. # and connect anonymously next.
...@@ -110,8 +111,8 @@ ...@@ -110,8 +111,8 @@
register: authed_replica_set_already_configured register: authed_replica_set_already_configured
ignore_errors: true ignore_errors: true
tags: tags:
- "install" - "manage"
- "install:configuration" - "manage:db-replication"
- name: Try checking the replica set with no user/pass in case this is a new box - name: Try checking the replica set with no user/pass in case this is a new box
mongodb_rs_status: mongodb_rs_status:
...@@ -121,8 +122,8 @@ ...@@ -121,8 +122,8 @@
when: authed_replica_set_already_configured.failed is defined when: authed_replica_set_already_configured.failed is defined
ignore_errors: true ignore_errors: true
tags: tags:
- "install" - "manage"
- "install:configuration" - "manage:db-replication"
# We use these in the templates but also to control a whole bunch of logic # We use these in the templates but also to control a whole bunch of logic
- name: set facts that default to not initializing a replica set - name: set facts that default to not initializing a replica set
...@@ -131,7 +132,7 @@ ...@@ -131,7 +132,7 @@
skip_replica_set: false skip_replica_set: false
tags: tags:
- "install" - "install"
- "install:configuration" - "install:app-configuration"
- "update_mongod_conf" - "update_mongod_conf"
# If either auth or unauthed access comes back with a replica set, we # If either auth or unauthed access comes back with a replica set, we
...@@ -145,15 +146,15 @@ ...@@ -145,15 +146,15 @@
when: authed_replica_set_already_configured.status is not defined when: authed_replica_set_already_configured.status is not defined
and unauthed_replica_set_already_configured.status is not defined and unauthed_replica_set_already_configured.status is not defined
tags: tags:
- "install" - "manage"
- "install:configuration" - "manage:db-replication"
- name: warn about unconfigured replica sets - name: warn about unconfigured replica sets
debug: msg="You do not appear to have a Replica Set configured, deploying one for you" debug: msg="You do not appear to have a Replica Set configured, deploying one for you"
when: initialize_replica_set when: initialize_replica_set
tags: tags:
- "install" - "manage"
- "install:configuration" - "manage:db-replication"
- name: copy mongodb key file - name: copy mongodb key file
copy: copy:
...@@ -164,8 +165,8 @@ ...@@ -164,8 +165,8 @@
group: mongodb group: mongodb
register: update_mongod_key register: update_mongod_key
tags: tags:
- "install" - "manage"
- "install:configuration" - "manage:db-replication"
- "mongodb_key" - "mongodb_key"
# If skip_replica_set is true, this template will not contain a replica set stanza # If skip_replica_set is true, this template will not contain a replica set stanza
...@@ -177,8 +178,8 @@ ...@@ -177,8 +178,8 @@
backup: yes backup: yes
register: update_mongod_conf register: update_mongod_conf
tags: tags:
- "install" - "manage"
- "install:configuration" - "manage:db-replication"
- "update_mongod_conf" - "update_mongod_conf"
- name: install logrotate configuration - name: install logrotate configuration
...@@ -187,7 +188,7 @@ ...@@ -187,7 +188,7 @@
dest: /etc/logrotate.d/hourly/mongo dest: /etc/logrotate.d/hourly/mongo
tags: tags:
- "install" - "install"
- "install:configuration" - "install:app-configuration"
- "logrotate" - "logrotate"
- name: restart mongo service if we changed our configuration - name: restart mongo service if we changed our configuration
...@@ -196,16 +197,16 @@ ...@@ -196,16 +197,16 @@
state: restarted state: restarted
when: update_mongod_conf.changed or update_mongod_key.changed when: update_mongod_conf.changed or update_mongod_key.changed
tags: tags:
- "install" - "manage"
- "install:configuration" - "manage:start"
- name: wait for mongo server to start - name: wait for mongo server to start
wait_for: wait_for:
port: 27017 port: 27017
delay: 2 delay: 2
tags: tags:
- "install" - "manage"
- "install:configuration" - "manage:start"
# We only try passwordless superuser creation when # We only try passwordless superuser creation when
# we're initializing the replica set and need to use # we're initializing the replica set and need to use
...@@ -250,7 +251,9 @@ ...@@ -250,7 +251,9 @@
when: initialize_replica_set when: initialize_replica_set
tags: tags:
- "install" - "install"
- "install:configuration" - "install:app-configuration"
- "manage"
- "manage:db-replication"
- name: re-copy configuration template with replica set enabled - name: re-copy configuration template with replica set enabled
template: template:
...@@ -259,8 +262,8 @@ ...@@ -259,8 +262,8 @@
backup: yes backup: yes
when: initialize_replica_set when: initialize_replica_set
tags: tags:
- "install" - "manage"
- "install:configuration" - "manage:db-replication"
- name: restart mongo service - name: restart mongo service
service: service:
...@@ -268,8 +271,9 @@ ...@@ -268,8 +271,9 @@
state: restarted state: restarted
when: initialize_replica_set when: initialize_replica_set
tags: tags:
- "install" - "manage"
- "install:configuration" - "manage:start"
- "manage:db-replication"
- name: wait for mongo server to start - name: wait for mongo server to start
wait_for: wait_for:
...@@ -277,8 +281,9 @@ ...@@ -277,8 +281,9 @@
delay: 2 delay: 2
when: initialize_replica_set when: initialize_replica_set
tags: tags:
- "install" - "manage"
- "install:configuration" - "manage:start"
- "manage:db-replication"
- name: configure replica set - name: configure replica set
mongodb_replica_set: mongodb_replica_set:
...@@ -290,7 +295,7 @@ ...@@ -290,7 +295,7 @@
tags: tags:
- "manage" - "manage"
- "manage:db" - "manage:db"
- "configure_replica_set" - "manage:db-replication"
# During initial replica set configuration, it can take a few seconds to vote # During initial replica set configuration, it can take a few seconds to vote
# a primary and for all members to reflect that status. During that window, # a primary and for all members to reflect that status. During that window,
...@@ -309,6 +314,7 @@ ...@@ -309,6 +314,7 @@
tags: tags:
- "manage" - "manage"
- "manage:db" - "manage:db"
- "manage:db-replication"
- name: create mongodb users in a replica set - name: create mongodb users in a replica set
mongodb_user: mongodb_user:
...@@ -326,3 +332,4 @@ ...@@ -326,3 +332,4 @@
tags: tags:
- "manage" - "manage"
- "manage:db" - "manage:db"
- "manage:db-replication"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment