Commit 31913ab9 by Sef Kloninger

edx-west: parameterize machine names in playbooks

Conflicts:
	playbooks/edx-west/prod-app.yml
	playbooks/edx-west/prod-worker.yml
	playbooks/edx-west/stage-app.yml
	playbooks/edx-west/stage-worker.yml
parent e98b43d0
# this gets all running prod webservers
# This uses variable expansion so you can select machine(s) from the command line
# using the -e flag. See README for instructions on how to use.
- hosts: ~tag_Name_{{machine}}_prod
#
# This alternative hits all running prod webservers. Left here as an example.
#- hosts: tag_environment_prod:&tag_function_webserver
# or we can get subsets of them by name
#- hosts: ~tag_Name_app(10|20)_prod
- hosts: ~tag_Name_app(11|21)_prod
## this is the test box
#- hosts: ~tag_Name_app4_prod
## you can also do security group, but don't do that
#- hosts: security_group_edx-prod-EdxappServerSecurityGroup-NSKCQTMZIPQB
sudo: True
vars_prompt:
- name: "migrate_db"
......
# For all util machines
- hosts: tag_environment_prod:&tag_function_util
# or we can get subsets of them by name
#- hosts: ~tag_Name_util(1|2)_prod
- name: Basic util setup on all hosts
# This uses variable expansion so you can select machine(s) from the command line
# using the -e flag. See README for instructions on how to use.
hosts: ~tag_Name_{{machine}}_prod
#
# This alternative hits all running prod webservers. Left here as an example.
# hosts: tag_environment_prod:&tag_function_util
sudo: True
vars:
secure_dir: '../../../configuration-secure/ansible'
......
- hosts: tag_environment_stage:&tag_function_webserver
#- hosts: tag_Name_app1_stage
# This uses variable expansion so you can select machine(s) from the command line
# using the -e flag. See README for instructions on how to use.
- hosts: ~tag_Name_{{machine}}_stage
#
# This alternative hits all running prod webservers. Left here as an example.
#- hosts: tag_environment_stage:&tag_function_webserver
sudo: True
vars_prompt:
- name: "migrate_db"
......
# this gets all running stage util machiens
- hosts: tag_environment_stage:&tag_function_util
# or we can get subsets of them by name
#- hosts: ~tag_Name_util(1|2)_stage
---
- name: Basic util setup on all hosts
# This uses variable expansion so you can select machine(s) from the command line
# using the -e flag. See README for instructions on how to use.
hosts: ~tag_Name_{{machine}}_stage
#
# This alternative hits all running prod webservers. Left here as an example.
# hosts: tag_environment_stage:&tag_function_util
sudo: True
vars:
secure_dir: ../../../edx-secret/ansible
......
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