-
-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #250 from punkrokk/master
Support Pack Install as a variable in stackstorm.st2 (py2)
- Loading branch information
Showing
7 changed files
with
68 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
--- | ||
- meta: flush_handlers | ||
tags: st2, st2_packs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
--- | ||
|
||
- name: Get list of installed st2 packs | ||
command: st2 pack list -j | ||
changed_when: no | ||
check_mode: no | ||
register: _st2_packs_installed | ||
become: yes | ||
become_user: root | ||
# Fix privilege escalation ENV in Dockerized environment | ||
environment: | ||
HOME: /root | ||
tags: st2, st2_packs | ||
|
||
# This gets the names of the currently installed st2 packs from a json list of dicts | ||
- set_fact: | ||
st2_packs_installed: "{{ _st2_packs_installed.stdout|from_json|map(attribute='name')|list() }}" | ||
tags: st2, st2_packs, | ||
|
||
- name: Install st2 packs | ||
command: st2 pack install "{{ item }}" | ||
loop: "{{ st2_packs }}" | ||
when: item not in st2_packs_installed | ||
become: yes | ||
become_user: root | ||
# Fix privilege escalation ENV in Dockerized environment | ||
environment: | ||
HOME: /root | ||
tags: st2, st2_packs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters