Fix git ignore to only apply to /ansible/ in the root (not the /util/ansible folder) and set hosts to localhost.
This commit is contained in:
parent
1e03feca9b
commit
c49f101735
|
@ -23,5 +23,6 @@ app/.env
|
|||
/vendor/
|
||||
|
||||
# Ansible deployment files
|
||||
ansible/
|
||||
/util/ansible/deploy.retry
|
||||
/ansible/
|
||||
/util/ansible/deploy.retry
|
||||
/util/ansible/update.retry
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
- hosts: all
|
||||
- hosts: localhost
|
||||
become: true
|
||||
vars:
|
||||
util_base: "{{ playbook_dir | dirname }}"
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
---
|
||||
- name: restart cron
|
||||
service: name=cron enabled=yes state=restarted
|
|
@ -0,0 +1,11 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# Pull down update
|
||||
git reset --hard
|
||||
git pull
|
||||
|
||||
chmod a+x ./update.sh
|
||||
|
||||
cd $util_base
|
||||
phpuser cli.php cache:clear
|
||||
phpuser doctrine.php orm:schema-tool:update --force --complete
|
|
@ -0,0 +1,24 @@
|
|||
---
|
||||
- name: Reset local git
|
||||
shell: git reset --hard
|
||||
args:
|
||||
chdir: "{{ www_base }}"
|
||||
|
||||
- name: Pull new Git repository
|
||||
shell: git pull
|
||||
args:
|
||||
chdir: "{{ www_base }}"
|
||||
|
||||
- name: Make update script executable again
|
||||
shell: "chmod a+x {{ www_base }}/update.sh"
|
||||
|
||||
- name: Clear AzuraCast Cache
|
||||
become: true
|
||||
become_user: azuracast
|
||||
shell: php {{ util_base }}/cli.php cache:clear
|
||||
|
||||
- name: Update Doctrine Database
|
||||
become: true
|
||||
become_user: azuracast
|
||||
shell: php {{ util_base }}/doctrine.php orm:schema-tool:update --force --complete
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
---
|
||||
- hosts: localhost
|
||||
become: true
|
||||
vars:
|
||||
util_base: "{{ playbook_dir | dirname }}"
|
||||
www_base: "{{ util_base | dirname }}"
|
||||
app_base: "{{ www_base | dirname }}"
|
||||
tmp_base: "{{ app_base }}/www_tmp"
|
||||
app_env: "production"
|
||||
|
||||
roles:
|
||||
- init
|
||||
- azuracast-radio
|
||||
- php-phalcon
|
||||
- composer
|
||||
- azuracast-cron
|
||||
- azuracast-update
|
Loading…
Reference in New Issue