-
-
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.
Initial pass at adding RH-capable provisioning for 'st2' and 'st2repo…
…s' roles Signed-off-by: Matt Oswalt <[email protected]>
- Loading branch information
Matt Oswalt
committed
Jan 4, 2017
1 parent
dd92822
commit 36329a6
Showing
8 changed files
with
115 additions
and
43 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
--- | ||
- name: Install latest st2 package | ||
become: yes | ||
apt: | ||
name: st2 | ||
state: latest | ||
when: st2_version == "stable" | ||
notify: | ||
- restart st2 | ||
|
||
- name: Install latest st2 package | ||
become: yes | ||
apt: | ||
name: st2={{ st2_version }}-{{ st2_revision }} | ||
state: present | ||
when: st2_version != "stable" | ||
notify: | ||
- restart st2 |
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,18 @@ | ||
--- | ||
- name: Install latest st2 package | ||
become: yes | ||
yum: | ||
name: st2 | ||
state: latest | ||
when: st2_version == "stable" | ||
notify: | ||
- restart st2 | ||
|
||
- name: Install latest st2 package | ||
become: yes | ||
yum: | ||
name: st2={{ st2_version }}-{{ st2_revision }} | ||
state: present | ||
when: st2_version != "stable" | ||
notify: | ||
- restart st2 |
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,23 @@ | ||
--- | ||
- name: Install prereqs (Debian) | ||
become: yes | ||
apt: | ||
name: "{{ item }}" | ||
state: present | ||
update_cache: yes | ||
with_items: | ||
- debian-archive-keyring | ||
- apt-transport-https | ||
|
||
- name: Add keys to keyring | ||
become: yes | ||
apt_key: | ||
url: https://packagecloud.io/StackStorm/{{ st2_pkg_repo }}/gpgkey | ||
state: present | ||
|
||
- name: Add StackStorm repos | ||
become: yes | ||
apt_repository: | ||
repo: 'deb https://packagecloud.io/StackStorm/{{ st2_pkg_repo }}/{{ ansible_distribution|lower }}/ {{ ansible_distribution_release|lower }} main' | ||
state: present | ||
update_cache: yes |
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 |
---|---|---|
@@ -1,25 +1,8 @@ | ||
--- | ||
# tasks file for st2repos | ||
|
||
- name: Install prereqs | ||
become: yes | ||
apt: | ||
name: "{{ item }}" | ||
state: present | ||
update_cache: yes | ||
with_items: | ||
- debian-archive-keyring | ||
- apt-transport-https | ||
|
||
- name: Add keys to keyring | ||
become: yes | ||
apt_key: | ||
url: https://packagecloud.io/StackStorm/{{ st2_pkg_repo }}/gpgkey | ||
state: present | ||
- include: debian.yml | ||
when: ansible_os_family == 'Debian' | ||
|
||
- name: Add StackStorm repos | ||
become: yes | ||
apt_repository: | ||
repo: 'deb https://packagecloud.io/StackStorm/{{ st2_pkg_repo }}/{{ ansible_distribution|lower }}/ {{ ansible_distribution_release|lower }} main' | ||
state: present | ||
update_cache: yes | ||
- include: redhat.yml | ||
when: ansible_os_family == 'RedHat' |
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,21 @@ | ||
--- | ||
# Tasks based on https://packagecloud.io/install/repositories/StackStorm/stable/script.rpm.sh | ||
|
||
- name: Retrieve configuration | ||
get_url: | ||
url: "https://packagecloud.io/install/repositories/StackStorm/stable/config_file.repo?os={{ ansible_distribution }}&dist={{ ansible_distribution_version }}&source=script" | ||
dest: /tmp/yum_config | ||
mode: 0440 | ||
|
||
- name: Load config file | ||
shell: cat /tmp/yum_config | ||
register: yum_config | ||
|
||
- name: Update YUM configuration | ||
become: yes | ||
blockinfile: | ||
dest: /etc/yum.repos.d/StackStorm_stable.repo | ||
create: yes | ||
marker: "### ANSIBLE MANAGED BLOCK ###" | ||
content: | | ||
{{ yum_config.stdout }} |