-
Notifications
You must be signed in to change notification settings - Fork 2
/
pcd_site.yml
41 lines (34 loc) · 1.2 KB
/
pcd_site.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
---
##
# prepare|configure|deploy a site
#
# 1. specify the site to apply by passing the PCD_SITE_NAME variable
#
# 2. specify the organization the site belongs to by passing PCD_SITE_ORG
#
# 3. -optionally- limit the hosts via --limit, and tasks via --tags
#
# e.g. ansible-playbook -i inventory/my.hosts pcd_site.yml --limit=webservers \
# --extra-vars="PCD_SITE_NAME=www.mysite.com PCD_SITE_ORG=myorg"
#
# + `prepare` tasks typically handle ONE-TIME prerequisites such as
# setting up mysql databases.
#
# + `configure` tasks typically execute more often, whenever configuration
# changes such as updating a virtualhost definition are made.
#
# + `deploy` tasks typically execute most often, performing git checkouts &c.
#
# + If no tags are passed, all tasks will be executed.
#
- name: "pcd site"
hosts: all
remote_user: root
vars_prompt:
- name: "PCD_SITE_NAME"
prompt: "PCD_SITE_NAME : Site Name"
- name: "PCD_SITE_ORG"
prompt: "PCD_SITE_ORG : Site Organization"
roles:
- {role: pcd-common, tags: ['prepare','configure','deploy']}
- {role: pcd-sites/apache_site, site_name: "{{ PCD_SITE_NAME }}", site_org: "{{ PCD_SITE_ORG }}" }