OPS-1593 As an operator, I want sudo_user converted to become user in roles and…

OPS-1593 As an operator, I want sudo_user converted to become user in roles and plays, for compatibility with Ansible 2.x
parent bcebe5be
- name: Deploy aide IDS - name: Deploy aide IDS
hosts: all hosts: all
sudo: True become: True
gather_facts: True gather_facts: True
vars: vars:
serial_count: 1 serial_count: 1
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
# Usage: ansible-playbook alton.yml -i <admin-host>, -e <secure-repo>/admin/edx_admin.yml -e <secure-repo>/admin/admin.yml # Usage: ansible-playbook alton.yml -i <admin-host>, -e <secure-repo>/admin/edx_admin.yml -e <secure-repo>/admin/admin.yml
- name: Configure instance(s) - name: Configure instance(s)
hosts: all hosts: all
sudo: True become: True
gather_facts: True gather_facts: True
vars: vars:
serial_count: 1 serial_count: 1
......
- name: Deploy all analytics services to a single node - name: Deploy all analytics services to a single node
hosts: all hosts: all
sudo: True become: True
gather_facts: True gather_facts: True
vars: vars:
migrate_db: "yes" migrate_db: "yes"
......
- name: Deploy Analytics API - name: Deploy Analytics API
hosts: all hosts: all
sudo: True become: True
gather_facts: True gather_facts: True
vars: vars:
ENABLE_DATADOG: False ENABLE_DATADOG: False
......
- name: Deploy Antivirus Scanner - name: Deploy Antivirus Scanner
hosts: all hosts: all
sudo: True become: True
gather_facts: True gather_facts: True
roles: roles:
- aws - aws
......
- name: Deploy Asqatasun - name: Deploy Asqatasun
hosts: all hosts: all
sudo: True become: True
gather_facts: True gather_facts: True
roles: roles:
- mysql - mysql
......
- name: Deploy aws - name: Deploy aws
hosts: all hosts: all
sudo: True become: True
gather_facts: True gather_facts: True
vars: vars:
serial_count: 1 serial_count: 1
......
- name: Deploy certs - name: Deploy certs
hosts: all hosts: all
sudo: True become: True
gather_facts: True gather_facts: True
vars: vars:
serial_count: 1 serial_count: 1
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
# ansible-playbook -i ec2.py cluster_rabbitmq.yml --limit tag_Name_stage-edx-commoncluster -e@/path/to/vars/env-deployment.yml -T 30 --list-hosts # ansible-playbook -i ec2.py cluster_rabbitmq.yml --limit tag_Name_stage-edx-commoncluster -e@/path/to/vars/env-deployment.yml -T 30 --list-hosts
- hosts: all - hosts: all
sudo: True become: True
serial: 1 serial: 1
vars: vars:
# By default take instances in and out of the elb(s) they # By default take instances in and out of the elb(s) they
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
region: us-east-1 region: us-east-1
state: absent state: absent
wait_timeout: 60 wait_timeout: 60
sudo: False become: False
when: elb_pre_post when: elb_pre_post
tasks: tasks:
- debug: msg="{{ ansible_ec2_local_ipv4 }}" - debug: msg="{{ ansible_ec2_local_ipv4 }}"
...@@ -44,5 +44,5 @@ ...@@ -44,5 +44,5 @@
state: present state: present
wait_timeout: 60 wait_timeout: 60
with_items: ec2_elbs with_items: ec2_elbs
sudo: False become: False
when: elb_pre_post when: elb_pre_post
- name: Deploy common - name: Deploy common
hosts: all hosts: all
sudo: True become: True
gather_facts: True gather_facts: True
vars: vars:
serial_count: 1 serial_count: 1
......
# ansible-playbook -i ec2.py commoncluster.yml --limit tag_Name_stage-edx-commoncluster -e@/path/to/vars/env-deployment.yml -T 30 --list-hosts # ansible-playbook -i ec2.py commoncluster.yml --limit tag_Name_stage-edx-commoncluster -e@/path/to/vars/env-deployment.yml -T 30 --list-hosts
- hosts: all - hosts: all
sudo: True become: True
serial: 1 serial: 1
vars: vars:
# By default take instances in and out of the elb(s) they # By default take instances in and out of the elb(s) they
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
region: us-east-1 region: us-east-1
state: absent state: absent
wait_timeout: 60 wait_timeout: 60
sudo: False become: False
when: elb_pre_post when: elb_pre_post
roles: roles:
- aws - aws
...@@ -52,7 +52,7 @@ ...@@ -52,7 +52,7 @@
state: present state: present
wait_timeout: 60 wait_timeout: 60
with_items: ec2_elbs with_items: ec2_elbs
sudo: False become: False
when: elb_pre_post when: elb_pre_post
# #
# In order to reconfigure the host resolution we are issuing a # In order to reconfigure the host resolution we are issuing a
...@@ -60,7 +60,7 @@ ...@@ -60,7 +60,7 @@
# TODO: We should probably poll to ensure the host comes back before moving # TODO: We should probably poll to ensure the host comes back before moving
# to the next host so that we don't reboot all of the servers simultaneously # to the next host so that we don't reboot all of the servers simultaneously
- hosts: all - hosts: all
sudo: True become: True
serial: 1 serial: 1
vars: vars:
reboot: False reboot: False
......
- name: connect a sandbox to production data - name: connect a sandbox to production data
hosts: all hosts: all
gather_facts: False gather_facts: False
sudo: True become: True
tasks: tasks:
# WARNING - calling lineinfile on a symlink # WARNING - calling lineinfile on a symlink
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
# to be run on a real system # to be run on a real system
- name: Create all user types (test play) - name: Create all user types (test play)
hosts: all hosts: all
sudo: True become: True
gather_facts: False gather_facts: False
vars_files: vars_files:
- 'roles/edxapp/defaults/main.yml' - 'roles/edxapp/defaults/main.yml'
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
pre_tasks: pre_tasks:
- fail: msg="You must pass a user into this play" - fail: msg="You must pass a user into this play"
when: user is not defined when: user is not defined
- name: give access with no sudo - name: give access with no become
set_fact: set_fact:
CUSTOM_USER_INFO: CUSTOM_USER_INFO:
- name: "{{ user }}" - name: "{{ user }}"
...@@ -23,10 +23,10 @@ ...@@ -23,10 +23,10 @@
- name: test-normal-user - name: test-normal-user
- name: test-restricted-user-edxapp - name: test-restricted-user-edxapp
type: restricted type: restricted
sudoers_template: 99-edxapp-manage-cmds.j2 becomeers_template: 99-edxapp-manage-cmds.j2
- name: test-restricted-user-anayltics - name: test-restricted-user-anayltics
type: restricted type: restricted
sudoers_template: 99-analytics-manage-cmds.j2 becomeers_template: 99-analytics-manage-cmds.j2
roles: roles:
- role: user - role: user
user_info: "{{ CUSTOM_USER_INFO }}" user_info: "{{ CUSTOM_USER_INFO }}"
# Creates a single user on a server # Creates a single user on a server
# By default no super-user privileges # By default no super-user privileges
# Example: ansible-playbook -i "jarv.sandbox.edx.org," ./create_user.yml -e "user=jarv" # Example: ansible-playbook -i "jarv.sandbox.edx.org," ./create_user.yml -e "user=jarv"
# Create a user with sudo privileges # Create a user with become privileges
# Example: ansible-playbook -i "jarv.sandbox.edx.org," ./create_user.yml -e "user=jarv" -e "give_sudo=true" # Example: ansible-playbook -i "jarv.sandbox.edx.org," ./create_user.yml -e "user=jarv" -e "give_become=true"
- name: Create a single user - name: Create a single user
hosts: all hosts: all
sudo: True become: True
gather_facts: False gather_facts: False
pre_tasks: pre_tasks:
- fail: msg="You must pass a user into this play" - fail: msg="You must pass a user into this play"
when: user is not defined when: user is not defined
- name: give access with no sudo - name: give access with no become
set_fact: set_fact:
CUSTOM_USER_INFO: CUSTOM_USER_INFO:
- name: "{{ user }}" - name: "{{ user }}"
github: true github: true
when: give_sudo is not defined when: give_become is not defined
- name: give access with sudo - name: give access with become
set_fact: set_fact:
CUSTOM_USER_INFO: CUSTOM_USER_INFO:
- name: "{{ user }}" - name: "{{ user }}"
type: admin type: admin
github: true github: true
when: give_sudo is defined when: give_become is defined
roles: roles:
- role: user - role: user
user_info: "{{ CUSTOM_USER_INFO }}" user_info: "{{ CUSTOM_USER_INFO }}"
- name: Deploy edX Credentials Service - name: Deploy edX Credentials Service
hosts: all hosts: all
sudo: True become: True
gather_facts: True gather_facts: True
vars: vars:
ENABLE_DATADOG: False ENABLE_DATADOG: False
......
- name: Deploy demo course - name: Deploy demo course
hosts: all hosts: all
sudo: True become: True
gather_facts: True gather_facts: True
vars: vars:
serial_count: 1 serial_count: 1
......
- name: Configure instance(s) - name: Configure instance(s)
hosts: all hosts: all
sudo: True become: True
gather_facts: False gather_facts: False
vars_files: vars_files:
- roles/edxapp/defaults/main.yml - roles/edxapp/defaults/main.yml
......
- name: Deploy edX Course Discovery Service - name: Deploy edX Course Discovery Service
hosts: all hosts: all
sudo: True become: True
gather_facts: True gather_facts: True
vars: vars:
ENABLE_DATADOG: False ENABLE_DATADOG: False
......
- name: Deploy edX Ecommerce - name: Deploy edX Ecommerce
hosts: all hosts: all
sudo: True become: True
gather_facts: True gather_facts: True
vars: vars:
ENABLE_DATADOG: False ENABLE_DATADOG: False
......
- name: Deploy edX Ecommerce Worker - name: Deploy edX Ecommerce Worker
hosts: all hosts: all
sudo: True become: True
gather_facts: True gather_facts: True
vars: vars:
ENABLE_DATADOG: False ENABLE_DATADOG: False
......
- name: Deploy the edx_ansible on AWS - name: Deploy the edx_ansible on AWS
hosts: all hosts: all
sudo: True become: True
gather_facts: True gather_facts: True
vars: vars:
serial_count: 1 serial_count: 1
......
- name: Configure instance(s) - name: Configure instance(s)
hosts: all hosts: all
sudo: True become: True
gather_facts: True gather_facts: True
serial: 10 serial: 10
vars: vars:
......
- name: Configure instance(s) - name: Configure instance(s)
hosts: jenkins_test hosts: jenkins_test
sudo: True become: True
gather_facts: True gather_facts: True
vars: vars:
migrate_db: "yes" migrate_db: "yes"
......
# ansible-playbook --limit tag_Name_mirror edx_mirror.yml --user ubuntu -i ec2.py # ansible-playbook --limit tag_Name_mirror edx_mirror.yml --user ubuntu -i ec2.py
- name: Configure instance(s) - name: Configure instance(s)
hosts: all hosts: all
sudo: True become: True
gather_facts: False gather_facts: False
roles: roles:
- role: nginx - role: nginx
......
- name: Configure stage instance(s) - name: Configure stage instance(s)
hosts: notifier_stage hosts: notifier_stage
sudo: True become: True
vars_files: vars_files:
- "{{ secure_dir }}/vars/stage/notifier.yml" - "{{ secure_dir }}/vars/stage/notifier.yml"
- "{{ secure_dir }}/vars/users.yml" - "{{ secure_dir }}/vars/users.yml"
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
- name: Configure loadtest instance(s) - name: Configure loadtest instance(s)
hosts: notifier_loadtest hosts: notifier_loadtest
sudo: True become: True
vars_files: vars_files:
- "{{ secure_dir }}/vars/loadtest/notifier.yml" - "{{ secure_dir }}/vars/loadtest/notifier.yml"
- "{{ secure_dir }}/vars/users.yml" - "{{ secure_dir }}/vars/users.yml"
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
- name: Configure stage edge instance(s) - name: Configure stage edge instance(s)
hosts: notifier_edge_stage hosts: notifier_edge_stage
sudo: True become: True
vars_files: vars_files:
- "{{ secure_dir }}/vars/edge_stage/notifier.yml" - "{{ secure_dir }}/vars/edge_stage/notifier.yml"
- "{{ secure_dir }}/vars/users.yml" - "{{ secure_dir }}/vars/users.yml"
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
- name: Configure prod instance(s) - name: Configure prod instance(s)
hosts: notifier_prod hosts: notifier_prod
sudo: True become: True
vars_files: vars_files:
- "{{ secure_dir }}/vars/prod/notifier.yml" - "{{ secure_dir }}/vars/prod/notifier.yml"
- "{{ secure_dir }}/vars/users.yml" - "{{ secure_dir }}/vars/users.yml"
...@@ -60,7 +60,7 @@ ...@@ -60,7 +60,7 @@
- name: Configure edge prod instance(s) - name: Configure edge prod instance(s)
hosts: notifier_edge_prod hosts: notifier_edge_prod
sudo: True become: True
vars_files: vars_files:
- "{{ secure_dir }}/vars/edge_prod/notifier.yml" - "{{ secure_dir }}/vars/edge_prod/notifier.yml"
- "{{ secure_dir }}/vars/users.yml" - "{{ secure_dir }}/vars/users.yml"
......
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
- name: Configure instance(s) - name: Configure instance(s)
hosts: launched hosts: launched
sudo: True become: True
gather_facts: True gather_facts: True
vars: vars:
elb: false elb: false
...@@ -79,7 +79,7 @@ ...@@ -79,7 +79,7 @@
- Name: "{{ name_tag }}" - Name: "{{ name_tag }}"
register: ec2_info register: ec2_info
when: elb when: elb
sudo: False become: False
- name: register instance into an elb if one was provided - name: register instance into an elb if one was provided
local_action: local_action:
module: ec2_elb module: ec2_elb
...@@ -89,4 +89,4 @@ ...@@ -89,4 +89,4 @@
ec2_elbs: ec2_elbs:
- "{{ elb }}" - "{{ elb }}"
when: elb when: elb
sudo: False become: False
...@@ -6,4 +6,4 @@ ...@@ -6,4 +6,4 @@
# Needed for timestamps # Needed for timestamps
gather_facts: True gather_facts: True
roles: roles:
- edx_service_rds - edx_service_rds
\ No newline at end of file
- name: Deploy edxapp - name: Deploy edxapp
hosts: all hosts: all
sudo: True become: True
gather_facts: True gather_facts: True
vars: vars:
serial_count: 1 serial_count: 1
......
- name: Run edxapp migrations - name: Run edxapp migrations
hosts: all hosts: all
sudo: False become: False
gather_facts: False gather_facts: False
vars: vars:
db_dry_run: "--list" db_dry_run: "--list"
......
- hosts: all - hosts: all
sudo: True become: True
vars: vars:
# By default take instances in and out of the elb(s) they # By default take instances in and out of the elb(s) they
# are attached to # are attached to
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
region: us-east-1 region: us-east-1
state: absent state: absent
wait_timeout: 60 wait_timeout: 60
sudo: False become: False
when: elb_pre_post when: elb_pre_post
roles: roles:
- common - common
...@@ -40,5 +40,5 @@ ...@@ -40,5 +40,5 @@
state: present state: present
wait_timeout: 60 wait_timeout: 60
with_items: ec2_elbs with_items: ec2_elbs
sudo: False become: False
when: elb_pre_post when: elb_pre_post
- name: Deploy celery flower (monitoring tool) - name: Deploy celery flower (monitoring tool)
hosts: all hosts: all
sudo: True become: True
gather_facts: True gather_facts: True
vars: vars:
serial_count: 1 serial_count: 1
......
- name: Deploy forum - name: Deploy forum
hosts: all hosts: all
sudo: True become: True
gather_facts: True gather_facts: True
vars: vars:
serial_count: 1 serial_count: 1
......
- name: Deploy Harstorage - name: Deploy Harstorage
hosts: all hosts: all
sudo: True become: True
gather_facts: True gather_facts: True
vars: vars:
nginx_default_sites: nginx_default_sites:
......
- name: Deploy Insights - name: Deploy Insights
hosts: all hosts: all
sudo: True become: True
gather_facts: True gather_facts: True
vars: vars:
ENABLE_DATADOG: False ENABLE_DATADOG: False
......
# Configure an instance with the admin jenkins. # Configure an instance with the admin jenkins.
- name: Configure instance(s) - name: Configure instance(s)
hosts: all hosts: all
sudo: True become: True
gather_facts: True gather_facts: True
vars: vars:
serial_count: 1 serial_count: 1
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
- name: Configure instance(s) - name: Configure instance(s)
hosts: jenkins_master hosts: jenkins_master
sudo: True become: True
gather_facts: True gather_facts: True
vars: vars:
COMMON_DATA_DIR: "/mnt2" COMMON_DATA_DIR: "/mnt2"
...@@ -56,4 +56,4 @@ ...@@ -56,4 +56,4 @@
- role: splunkforwarder - role: splunkforwarder
when: COMMON_ENABLE_SPLUNKFORWARDER when: COMMON_ENABLE_SPLUNKFORWARDER
tags: splunkonly tags: splunkonly
sudo: True become: True
# Configure an instance with the tool jenkins. # Configure an instance with the tool jenkins.
- name: Configure Jenkins instance(s) - name: Configure Jenkins instance(s)
hosts: all hosts: all
sudo: True become: True
gather_facts: True gather_facts: True
vars: vars:
serial_count: 1 serial_count: 1
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
- name: Configure instance(s) - name: Configure instance(s)
hosts: jenkins_worker hosts: jenkins_worker
sudo: True become: True
gather_facts: True gather_facts: True
vars: vars:
mongo_enable_journal: False mongo_enable_journal: False
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
- name: Configure instance(s) - name: Configure instance(s)
hosts: jenkins_worker hosts: jenkins_worker
sudo: True become: True
gather_facts: True gather_facts: True
vars: vars:
mongo_enable_journal: False mongo_enable_journal: False
......
# ansible-playbook -i ec2.py --limit="tag_cluster_certificates:&tag_environment_loadtest" legacy_certificates.yml # ansible-playbook -i ec2.py --limit="tag_cluster_certificates:&tag_environment_loadtest" legacy_certificates.yml
- name: Deploy legacy_certs - name: Deploy legacy_certs
hosts: all hosts: all
sudo: True become: True
gather_facts: True gather_facts: True
vars: vars:
serial_count: 1 serial_count: 1
......
- name: Deploy Locust - name: Deploy Locust
hosts: all hosts: all
sudo: True become: True
gather_facts: True gather_facts: True
roles: roles:
- aws - aws
......
- name: Deploy edxapp - name: Deploy edxapp
hosts: all hosts: all
sudo: True become: True
gather_facts: True gather_facts: True
vars: vars:
serial_count: 1 serial_count: 1
......
- name: Deploy MongoDB - name: Deploy MongoDB
hosts: all hosts: all
sudo: True become: True
gather_facts: True gather_facts: True
roles: roles:
- aws - aws
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
# ansible-playbook mongo_3_0.yml -i 10.1.1.1,10.2.2.2,new-machine-ip -e@/path/to/edx.yml -e@/path/to/ed.yml # ansible-playbook mongo_3_0.yml -i 10.1.1.1,10.2.2.2,new-machine-ip -e@/path/to/edx.yml -e@/path/to/ed.yml
- name: Deploy MongoDB - name: Deploy MongoDB
hosts: all hosts: all
sudo: True become: True
gather_facts: True gather_facts: True
roles: roles:
- aws - aws
......
- name: Deploy MySQL - name: Deploy MySQL
hosts: all hosts: all
sudo: True become: True
gather_facts: True gather_facts: True
roles: roles:
- mysql - mysql
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
# ansible-playbook -i ec2.py --limit "tag_cluster_mongo" newrelic.yml -e NEWRELIC_LICENSE_KEY='SET_ME' -v # ansible-playbook -i ec2.py --limit "tag_cluster_mongo" newrelic.yml -e NEWRELIC_LICENSE_KEY='SET_ME' -v
- name: Deploy Newrelic Server Monitoring - name: Deploy Newrelic Server Monitoring
hosts: all hosts: all
sudo: True become: True
gather_facts: True gather_facts: True
vars: vars:
CLUSTER_NAME: 'edxapp' CLUSTER_NAME: 'edxapp'
......
- name: Deploy edX Notes API - name: Deploy edX Notes API
hosts: all hosts: all
sudo: True become: True
gather_facts: True gather_facts: True
vars: vars:
ENABLE_DATADOG: False ENABLE_DATADOG: False
......
- name: Configure notifier instance - name: Configure notifier instance
hosts: all hosts: all
sudo: True become: True
gather_facts: True gather_facts: True
vars: vars:
serial_count: 1 serial_count: 1
......
- name: Configure OAuth2 clients - name: Configure OAuth2 clients
hosts: all hosts: all
sudo: True become: True
gather_facts: True gather_facts: True
vars_files: vars_files:
- "roles/common_vars/defaults/main.yml" - "roles/common_vars/defaults/main.yml"
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
- name: Update edx-ora2 - name: Update edx-ora2
hosts: all hosts: all
sudo: True become: True
gather_facts: True gather_facts: True
vars: vars:
- edxapp_venv_dir: "/edx/app/edxapp/venvs/edxapp" - edxapp_venv_dir: "/edx/app/edxapp/venvs/edxapp"
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
chdir={{ edxapp_code_dir }} chdir={{ edxapp_code_dir }}
environment: environment:
PATH: "{{ edxapp_deploy_path }}" PATH: "{{ edxapp_deploy_path }}"
sudo_user: "{{ edxapp_user }}" become_user: "{{ edxapp_user }}"
notify: notify:
- "restart edxapp" - "restart edxapp"
- "restart workers" - "restart workers"
......
- name: Deploy edX Programs Service - name: Deploy edX Programs Service
hosts: all hosts: all
sudo: True become: True
gather_facts: True gather_facts: True
vars: vars:
ENABLE_DATADOG: False ENABLE_DATADOG: False
......
- name: Deploy rabbitmq - name: Deploy rabbitmq
hosts: all hosts: all
sudo: True become: True
# The rabbitmq role depends on # The rabbitmq role depends on
# ansible_default_ipv4 so # ansible_default_ipv4 so
# gather_facts must be set to True # gather_facts must be set to True
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
region: us-east-1 region: us-east-1
state: absent state: absent
wait_timeout: 60 wait_timeout: 60
sudo: False become: False
when: elb_pre_post when: elb_pre_post
roles: roles:
- aws - aws
...@@ -43,5 +43,5 @@ ...@@ -43,5 +43,5 @@
state: present state: present
wait_timeout: 60 wait_timeout: 60
with_items: ec2_elbs with_items: ec2_elbs
sudo: False become: False
when: elb_pre_post when: elb_pre_post
- name: restarts supervisor - name: restarts supervisor
hosts: all hosts: all
sudo: True become: True
gather_facts: False gather_facts: False
vars_files: vars_files:
- roles/common_vars/defaults/main.yml - roles/common_vars/defaults/main.yml
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
# #
- name: Stop all services - name: Stop all services
hosts: "{{TARGET}}" hosts: "{{TARGET}}"
sudo: True become: True
gather_facts: False gather_facts: False
vars: vars:
STOP_ALL_EDX_SERVICES_EXTRA_ARGS: "--no-wait" STOP_ALL_EDX_SERVICES_EXTRA_ARGS: "--no-wait"
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
- name: Server retirement workflow - name: Server retirement workflow
hosts: "{{TARGET}}" hosts: "{{TARGET}}"
sudo: True become: True
gather_facts: False gather_facts: False
tasks: tasks:
- name: Terminate existing s3 log sync - name: Terminate existing s3 log sync
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
- name: Run minos verification - name: Run minos verification
hosts: "{{TARGET}}" hosts: "{{TARGET}}"
sudo: True become: True
gather_facts: False gather_facts: False
tasks: tasks:
- name: Run minos - name: Run minos
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
- name: Set hostname - name: Set hostname
hosts: all hosts: all
sudo: True become: True
gather_facts: False gather_facts: False
tasks: tasks:
- name: "Ensure we have a hostname" - name: "Ensure we have a hostname"
......
- name: Deploy Sitespeed.io - name: Deploy Sitespeed.io
hosts: all hosts: all
sudo: True become: True
gather_facts: True gather_facts: True
roles: roles:
- aws - aws
......
- name: Deploy snort IDS - name: Deploy snort IDS
hosts: all hosts: all
sudo: True become: True
gather_facts: True gather_facts: True
vars: vars:
serial_count: 1 serial_count: 1
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
- name: Deploy Splunk - name: Deploy Splunk
hosts: all hosts: all
sudo: True become: True
gather_facts: True gather_facts: True
vars: vars:
roles: roles:
......
- name: Stop all services - name: Stop all services
hosts: all hosts: all
sudo: True become: True
gather_facts: False gather_facts: False
vars: vars:
serial_count: 1 serial_count: 1
......
- name: Deploy Tanaguru - name: Deploy Tanaguru
hosts: all hosts: all
sudo: True become: True
gather_facts: True gather_facts: True
roles: roles:
- aws - aws
......
- hosts: all - hosts: all
sudo: true become: true
vars: vars:
# By default take instances in and out of the elb(s) they # By default take instances in and out of the elb(s) they
# are attached to # are attached to
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
region: us-east-1 region: us-east-1
state: absent state: absent
wait_timeout: 60 wait_timeout: 60
sudo: False become: False
when: elb_pre_post when: elb_pre_post
tasks: tasks:
- shell: echo "test" - shell: echo "test"
...@@ -36,5 +36,5 @@ ...@@ -36,5 +36,5 @@
state: present state: present
wait_timeout: 60 wait_timeout: 60
with_items: ec2_elbs with_items: ec2_elbs
sudo: False become: False
when: elb_pre_post when: elb_pre_post
- name: Create courses for testing - name: Create courses for testing
hosts: all hosts: all
sudo: True become: True
gather_facts: True gather_facts: True
vars: vars:
serial_count: 1 serial_count: 1
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
# ansible-playbook -i 'reporting.example.com,' ./tools-gp.yml --tags users -e@/var/path/users.yml -e@/vars/path/environnment-deployment.yml # ansible-playbook -i 'reporting.example.com,' ./tools-gp.yml --tags users -e@/var/path/users.yml -e@/vars/path/environnment-deployment.yml
- name: Deploy Ad Hoc Reporting Scripts - name: Deploy Ad Hoc Reporting Scripts
hosts: all hosts: all
sudo: True become: True
gather_facts: True gather_facts: True
vars: vars:
serial_count: 1 serial_count: 1
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
# Configure an admin instance with jenkins and asgard. # Configure an admin instance with jenkins and asgard.
- name: Configure instance(s) - name: Configure instance(s)
hosts: all hosts: all
sudo: True become: True
gather_facts: True gather_facts: True
roles: roles:
- aws - aws
......
- name: Deploy worker - name: Deploy worker
hosts: all hosts: all
sudo: True become: True
gather_facts: True gather_facts: True
roles: roles:
- aws - aws
...@@ -14,4 +14,4 @@ ...@@ -14,4 +14,4 @@
when: COMMON_ENABLE_NEWRELIC when: COMMON_ENABLE_NEWRELIC
- role: minos - role: minos
when: COMMON_ENABLE_MINOS when: COMMON_ENABLE_MINOS
\ No newline at end of file
- name: Deploy xqueue - name: Deploy xqueue
hosts: all hosts: all
sudo: True become: True
gather_facts: True gather_facts: True
vars: vars:
# By default take instances in and out of the elb(s) they # By default take instances in and out of the elb(s) they
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
region: us-east-1 region: us-east-1
state: absent state: absent
wait_timeout: 60 wait_timeout: 60
sudo: False become: False
when: elb_pre_post when: elb_pre_post
roles: roles:
- aws - aws
...@@ -49,5 +49,5 @@ ...@@ -49,5 +49,5 @@
state: present state: present
wait_timeout: 60 wait_timeout: 60
with_items: ec2_elbs with_items: ec2_elbs
sudo: False become: False
when: elb_pre_post when: elb_pre_post
- name: Deploy xqueue-watcher - name: Deploy xqueue-watcher
hosts: all hosts: all
sudo: True become: True
gather_facts: True gather_facts: True
vars: vars:
COMMON_APP_DIR: "/edx/app" COMMON_APP_DIR: "/edx/app"
......
- name: Deploy xserver - name: Deploy xserver
hosts: all hosts: all
sudo: True become: True
gather_facts: True gather_facts: True
vars: vars:
serial_count: 1 serial_count: 1
......
# Configure an admin instance with jenkins and asgard. # Configure an admin instance with jenkins and asgard.
- name: Configure instance(s) - name: Configure instance(s)
hosts: all hosts: all
sudo: True become: True
gather_facts: True gather_facts: True
roles: roles:
- aws - aws
......
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