From abdfd6cc6d1a5449d9d35649ebe98511fa69044d Mon Sep 17 00:00:00 2001 From: David Trail Date: Wed, 20 Jan 2016 10:17:03 +0000 Subject: [PATCH 1/3] Fixes for Ansible 2.0 --- tasks/00-facts.yml | 4 ++-- tasks/empty.yml | 1 - tasks/main.yml | 18 +++++++++++++----- 3 files changed, 15 insertions(+), 8 deletions(-) delete mode 100644 tasks/empty.yml diff --git a/tasks/00-facts.yml b/tasks/00-facts.yml index 83df7ac35..096fc16c3 100644 --- a/tasks/00-facts.yml +++ b/tasks/00-facts.yml @@ -2,7 +2,7 @@ # simplify folder and command vars - name: Check/define release name. - set_fact: symfony_project_release={{ lookup('pipe', 'date +%Y%m%d%H%M%S') }} + set_fact: symfony_project_release="{{ lookup('pipe', 'date +%Y%m%d%H%M%S') }}" when: symfony_project_release == None - name: Set symfony_current_release. @@ -15,4 +15,4 @@ set_fact: symfony_shared_dir={{symfony_project_root}}/shared - name: Set symfony_console. - set_fact: symfony_console={{symfony_current_release_dir}}/app/console \ No newline at end of file + set_fact: symfony_console={{symfony_current_release_dir}}/app/console diff --git a/tasks/empty.yml b/tasks/empty.yml deleted file mode 100644 index 73b314ff7..000000000 --- a/tasks/empty.yml +++ /dev/null @@ -1 +0,0 @@ ---- \ No newline at end of file diff --git a/tasks/main.yml b/tasks/main.yml index 8e4f4a62b..a40491dba 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -22,7 +22,9 @@ shell: cat {{symfony_current_release_dir}}/composer.json register: composer_content -- include: "{{ symfony_project_post_folder_creation_tasks | default('empty.yml') }}" +- name: Include creation tasks. + include: "{{ symfony_project_post_folder_creation_tasks }}" + when: symfony_project_post_folder_creation_tasks - name: Create symlinks to shared directories. file: state=link src="{{symfony_shared_dir}}{{item.src}}" path="{{symfony_current_release_dir}}{{item.path}}" @@ -33,7 +35,9 @@ - include: 20-composer.yml -- include: "{{ symfony_project_pre_cache_warmup_tasks | default('empty.yml') }}" +- name: Include pre cache warmup tasks. + include: "{{ symfony_project_pre_cache_warmup_tasks }}" + when: symfony_project_pre_cache_warmup_tasks - include: 30-cache.yml @@ -44,11 +48,15 @@ - name: create release file copy: content="{{symfony_current_release}}" dest="{{symfony_current_release_dir}}/RELEASE" mode=644 -- include: "{{ symfony_project_pre_live_switch_tasks | default('empty.yml') }}" +- name: Include pre live switch tasks. + include: "{{ symfony_project_pre_live_switch_tasks }}" + when: symfony_project_pre_live_switch_tasks - name: Create symlink for release. file: state=link src="{{symfony_current_release_dir}}" path="{{symfony_project_root}}/current" -- include: "{{ symfony_project_post_live_switch_tasks | default('empty.yml') }}" +- name: Include post live switch tasks. + include: "{{ symfony_project_post_live_switch_tasks }}" + when: symfony_project_post_live_switch_tasks -- include: 60-clean_releases.yml \ No newline at end of file +- include: 60-clean_releases.yml From b5f4dce47fc8e9c34b0a63db004243ab9f4c4ef8 Mon Sep 17 00:00:00 2001 From: David Trail Date: Thu, 21 Jan 2016 14:50:10 +0000 Subject: [PATCH 2/3] Travis CI build 103569777 --- hooks/post_folder_creation.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hooks/post_folder_creation.yml b/hooks/post_folder_creation.yml index b24f473f7..c781327f1 100644 --- a/hooks/post_folder_creation.yml +++ b/hooks/post_folder_creation.yml @@ -1,6 +1,6 @@ --- - name: hook | Create web/uploads folder. - file: state=directory path={{symfony_shared_dir}}/web/uploads + file: state=directory path="{{symfony_shared_dir}}/web/uploads" - name: hook | Symlink to release. file: state=link src="{{symfony_shared_dir}}/web/uploads" path="{{symfony_current_release_dir}}/web/uploads" From ddf7c8d6ce41191916d1164a939b375fe75e05b4 Mon Sep 17 00:00:00 2001 From: Naypam Date: Tue, 9 Feb 2016 22:41:34 +0000 Subject: [PATCH 3/3] exists so it doesn't bug out --- tasks/main.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tasks/main.yml b/tasks/main.yml index a40491dba..95e478beb 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -24,7 +24,7 @@ - name: Include creation tasks. include: "{{ symfony_project_post_folder_creation_tasks }}" - when: symfony_project_post_folder_creation_tasks + when: symfony_project_post_folder_creation_tasks | exists - name: Create symlinks to shared directories. file: state=link src="{{symfony_shared_dir}}{{item.src}}" path="{{symfony_current_release_dir}}{{item.path}}" @@ -37,7 +37,7 @@ - name: Include pre cache warmup tasks. include: "{{ symfony_project_pre_cache_warmup_tasks }}" - when: symfony_project_pre_cache_warmup_tasks + when: symfony_project_pre_cache_warmup_tasks | exists - include: 30-cache.yml @@ -50,13 +50,13 @@ - name: Include pre live switch tasks. include: "{{ symfony_project_pre_live_switch_tasks }}" - when: symfony_project_pre_live_switch_tasks + when: symfony_project_pre_live_switch_tasks | exists - name: Create symlink for release. file: state=link src="{{symfony_current_release_dir}}" path="{{symfony_project_root}}/current" - name: Include post live switch tasks. include: "{{ symfony_project_post_live_switch_tasks }}" - when: symfony_project_post_live_switch_tasks + when: symfony_project_post_live_switch_tasks | exists - include: 60-clean_releases.yml