Skip to content

Commit

Permalink
Adding a separate playbook for nginx.
Browse files Browse the repository at this point in the history
  • Loading branch information
jonpugh committed May 2, 2016
1 parent 86eaf77 commit 7d7a282
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 3 deletions.
10 changes: 8 additions & 2 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ fi
echo " Installing with Ansible..."
echo $LINE

ANSIBLE_EXTRA_VARS="server_hostname=$HOSTNAME_FQDN mysql_root_password=$MYSQL_ROOT_PASSWORD playbook_path=$PLAYBOOK_PATH server_webserver=$SERVER_WEBSERVER devshop_version=$DEVSHOP_VERSION"
ANSIBLE_EXTRA_VARS="server_hostname=$HOSTNAME_FQDN mysql_root_password=$MYSQL_ROOT_PASSWORD playbook_path=$PLAYBOOK_PATH devshop_version=$DEVSHOP_VERSION"

if [ "$TRAVIS" == "true" ]; then
ANSIBLE_EXTRA_VARS="$ANSIBLE_EXTRA_VARS travis=true travis_repo_slug=$TRAVIS_REPO_SLUG travis_branch=$TRAVIS_BRANCH travis_commit=$TRAVIS_COMMIT supervisor_running=false"
Expand All @@ -309,7 +309,13 @@ if [ -n "$ANSIBLE_EXTRA_VARS" ]; then
ANSIBLE_EXTRA_VARS="$ANSIBLE_EXTRA_VARS devshop_makefile=$MAKEFILE_PATH"
fi

ansible-playbook -i inventory playbook.yml --connection=local --extra-vars "$ANSIBLE_EXTRA_VARS"
if [ $SERVER_WEBSERVER == 'apache' ]; then
PLAYBOOK_FILE="playbook.yml"
elif [ $SERVER_WEBSERVER == 'nginx' ]; then
PLAYBOOK_FILE="playbook-nginx.yml"
fi

ansible-playbook -i inventory $PLAYBOOK_FILE --connection=local --extra-vars "$ANSIBLE_EXTRA_VARS"

# @TODO: Remove. We should do this in the playbook, right?
# Run Composer install to enable devshop cli
Expand Down
14 changes: 14 additions & 0 deletions playbook-nginx.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
##
# DevShop: DevMaster Server with NGINX
#

---
- hosts: all
user: root
roles:
- opendevshop.aegir-user
- opendevshop.aegir-nginx
- geerlingguy.php
- geerlingguy.php-mysql
- geerlingguy.composer
- opendevshop.devmaster
2 changes: 1 addition & 1 deletion playbook.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
##
# DevShop: DevMaster Role.
# DevShop: DevMaster Server with Apache
#

---
Expand Down

0 comments on commit 7d7a282

Please sign in to comment.