Commit 81d01591 by e0d

Code review comments

parent a5420771
...@@ -5,7 +5,6 @@ ...@@ -5,7 +5,6 @@
vars: vars:
roles: roles:
- aws - aws
- minos
- role: nginx - role: nginx
nginx_sites: nginx_sites:
- lms - lms
...@@ -21,3 +20,5 @@ ...@@ -21,3 +20,5 @@
when: COMMON_ENABLE_SPLUNKFORWARDER when: COMMON_ENABLE_SPLUNKFORWARDER
- role: newrelic - role: newrelic
when: COMMON_ENABLE_NEWRELIC when: COMMON_ENABLE_NEWRELIC
- role: minos
when: COMMON_ENABLE_MINOS
...@@ -4,7 +4,6 @@ ...@@ -4,7 +4,6 @@
gather_facts: True gather_facts: True
roles: roles:
- aws - aws
- minos
- role: edxapp - role: edxapp
celery_worker: True celery_worker: True
- role: datadog - role: datadog
...@@ -13,5 +12,6 @@ ...@@ -13,5 +12,6 @@
when: COMMON_ENABLE_SPLUNKFORWARDER when: COMMON_ENABLE_SPLUNKFORWARDER
- role: newrelic - role: newrelic
when: COMMON_ENABLE_NEWRELIC when: COMMON_ENABLE_NEWRELIC
- role: minos
when: COMMON_ENABLE_MINOS
\ No newline at end of file
...@@ -56,6 +56,7 @@ COMMON_ENABLE_DATADOG: False ...@@ -56,6 +56,7 @@ COMMON_ENABLE_DATADOG: False
COMMON_ENABLE_NGINXTRA: False COMMON_ENABLE_NGINXTRA: False
COMMON_ENABLE_SPLUNKFORWARDER: False COMMON_ENABLE_SPLUNKFORWARDER: False
COMMON_ENABLE_NEWRELIC: False COMMON_ENABLE_NEWRELIC: False
COMMON_ENABLE_MINOS: False
COMMON_TAG_EC2_INSTANCE: False COMMON_TAG_EC2_INSTANCE: False
common_debian_pkgs: common_debian_pkgs:
- ntp - ntp
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
# Defaults for role minos # Defaults for role minos
# #
MINOS_GIT_IDENTITY: !!null MINOS_GIT_IDENTITY: !!null
INSTALL_MINOS: false
# #
# vars are namespace with the module name. # vars are namespace with the module name.
# #
......
...@@ -12,13 +12,26 @@ ...@@ -12,13 +12,26 @@
# Tasks for role minos # Tasks for role minos
# #
# Overview: # Overview:
# #
# Install the, currently private, minos application
# which determines whether or not it is safe to retire
# a server
# #
# Dependencies: # Dependencies:
# #
# Relies on the common role.
# #
# Example play: # Example play:
# #
# - name: Deploy minos
# hosts: all
# sudo: True
# gather_facts: True
# vars:
# COMMON_ENABLE_MINOS: True
# roles:
# - common
# - minos
# #
- name: gather ec2 facts - name: gather ec2 facts
...@@ -31,14 +44,12 @@ ...@@ -31,14 +44,12 @@
owner=root owner=root
group=root group=root
mode=0755 mode=0755
when: INSTALL_MINOS
- name: create minos config - name: create minos config
template: > template: >
dest={{ minos_cfg_file }} dest={{ minos_cfg_file }}
src=edx/etc/minos/minos.yml.j2 src=edx/etc/minos/minos.yml.j2
mode=0755 owner=root group=root mode=0755 owner=root group=root
when: INSTALL_MINOS
- name: create minos voters configs - name: create minos voters configs
template: > template: >
...@@ -50,7 +61,6 @@ ...@@ -50,7 +61,6 @@
- "ProccessQuienscenceVoterCelery" - "ProccessQuienscenceVoterCelery"
- "ProccessQuienscenceVoterGunicorn" - "ProccessQuienscenceVoterGunicorn"
- "TrackingLogVoter" - "TrackingLogVoter"
when: INSTALL_MINOS
# Optional auth for git # Optional auth for git
- name: create ssh script for git (not authenticated) - name: create ssh script for git (not authenticated)
...@@ -58,7 +68,6 @@ ...@@ -58,7 +68,6 @@
src=tmp/git-identity.sh.j2 dest={{ minos_git_ssh }} src=tmp/git-identity.sh.j2 dest={{ minos_git_ssh }}
mode=750 mode=750
when: when:
- INSTALL_MINOS
- MINOS_GIT_IDENTITY is not defined - MINOS_GIT_IDENTITY is not defined
- name: create ssh script for git (authenticated) - name: create ssh script for git (authenticated)
...@@ -66,14 +75,12 @@ ...@@ -66,14 +75,12 @@
src=tmp/git-identity.sh.j2 dest={{ minos_git_ssh }} src=tmp/git-identity.sh.j2 dest={{ minos_git_ssh }}
mode=750 mode=750
when: when:
- INSTALL_MINOS
- MINOS_GIT_IDENTITY is defined - MINOS_GIT_IDENTITY is defined
- name: install read-only ssh key - name: install read-only ssh key
copy: > copy: >
content="{{ COMMON_GIT_IDENTITY }}" dest="{{ minos_git_identity }}" content="{{ COMMON_GIT_IDENTITY }}" dest="{{ minos_git_identity }}"
force=yes mode=0600 force=yes mode=0600
when: INSTALL_MINOS
- name : install python custom-requirements - name : install python custom-requirements
pip: > pip: >
...@@ -85,4 +92,3 @@ ...@@ -85,4 +92,3 @@
GIT_SSH: "{{ minos_git_ssh }}" GIT_SSH: "{{ minos_git_ssh }}"
with_items: with_items:
- "{{ minos_requirement }}" - "{{ minos_requirement }}"
when: INSTALL_MINOS
\ No newline at end of file
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