Skip to content

Commit

Permalink
v0.3.6
Browse files Browse the repository at this point in the history
- hotfix on multiple main.present.yml running
  • Loading branch information
Cedric Poon committed Aug 21, 2020
1 parent ac05288 commit 1664f70
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
12 changes: 4 additions & 8 deletions templates/main.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@
delegate_to: localhost

- block:
- name: proflow | behave as present
include_tasks: "main.present.yml"
when: __state__ == 'present' and __task__.stat.exists
- name: proflow | behave as {{'{{'}} __state__ {{'}}'}}
include_tasks: "main.{{'{{'}} __state__ {{'}}'}}.yml"
when: __task__.stat.exists

rescue:
- name: proflow | failure without rollback
fail:
msg: failed task in present
when: rollback is undefined or rollback | length == 0
when: rollback is undefined or rollback | length == 0 or __state__ != 'present'

- name: proflow | set state to absent for rollback
set_fact:
Expand All @@ -38,7 +38,3 @@

- name: proflow | end of rollback
meta: end_play

- name: proflow | behave as {{'{{'}} __state__ {{'}}'}}
include_tasks: "main.{{'{{'}} __state__ {{'}}'}}.yml"
when: __task__.stat.exists
2 changes: 1 addition & 1 deletion vars/galaxy.src.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
namespace: cedricpoon
name: proflow
version: 0.3.5
version: 0.3.6
readme: README.md
authors:
- Cedric Poon <cedric@poons.me>
Expand Down

0 comments on commit 1664f70

Please sign in to comment.