-
-
Notifications
You must be signed in to change notification settings - Fork 73
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 #78 from StackStorm/rhel_mistral_support
Rhel support for mistral and create postgresql role (remove AXNS.postgresql dependency)
- Loading branch information
Showing
17 changed files
with
212 additions
and
57 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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,19 @@ | ||
--- | ||
galaxy_info: | ||
description: Install PostgreSQL | ||
author: humblearner | ||
company: StackStorm | ||
license: Apache | ||
min_ansible_version: 2.2 | ||
tags: [db, postgresql] | ||
platforms: | ||
- name: Ubuntu | ||
versions: | ||
- trusty | ||
- xenial | ||
- name: EL | ||
versions: | ||
- 6 | ||
- 7 | ||
categories: | ||
- system |
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,11 @@ | ||
--- | ||
- name: Install PostgreSQL on {{ ansible_distribution }}-{{ ansible_distribution_major_version }} | ||
include: roles/postgresql/tasks/postgresql_{{ ansible_pkg_mgr }}{{ ansible_distribution_major_version }}.yml | ||
tags: [db, postgresql] | ||
when: ansible_os_family == "RedHat" | ||
|
||
- name: Install PostgreSQL on {{ ansible_distribution }}-{{ ansible_distribution_major_version }} | ||
include: roles/postgresql/tasks/postgresql_{{ ansible_pkg_mgr }}.yml | ||
tags: [db, postgresql] | ||
when: ansible_os_family == "Debian" | ||
|
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,15 @@ | ||
--- | ||
- name: apt | Install PostgreSQL | ||
become: yes | ||
apt: | ||
name: postgresql | ||
state: installed | ||
tags: [db, postgresql] | ||
|
||
- name: apt | Start and Enable PostgreSQL | ||
become: yes | ||
service: | ||
name: postgresql | ||
state: started | ||
enabled: yes | ||
tags: [db, postgresql] |
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,66 @@ | ||
--- | ||
- name: yum | Setup PostgreSQL repository for {{ ansible_distribution }} | ||
become: yes | ||
yum: | ||
name: https://yum.postgresql.org/9.4/redhat/rhel-6-x86_64/pgdg-centos94-9.4-3.noarch.rpm | ||
state: installed | ||
when: ansible_distribution == "CentOS" | ||
tags: [db, postgresql] | ||
|
||
- name: yum | Setup PostgreSQL repository for {{ ansible_distribution }} | ||
become: yes | ||
yum: | ||
name: https://yum.postgresql.org/9.4/redhat/rhel-6-x86_64/pgdg-redhat94-9.4-3.noarch.rpm | ||
state: installed | ||
when: ansible_distribution == "RedHat" | ||
tags: [db, postgresql] | ||
|
||
- name: yum | Install PostgreSQL dependency | ||
become: yes | ||
yum: | ||
name: libselinux-python | ||
state: installed | ||
tags: [db, postgresql] | ||
|
||
- name: yum | Install PostgreSQL-9.4 | ||
become: yes | ||
yum: | ||
name: "{{ item }}" | ||
state: installed | ||
with_items: | ||
- postgresql94-server | ||
- postgresql94-contrib | ||
- postgresql94-devel | ||
register: install_postgresql | ||
tags: [db, postgresql] | ||
|
||
- name: yum | Initialize PostgreSQL-9.4 | ||
become: yes | ||
command: service postgresql-9.4 initdb | ||
when: install_postgresql.changed | ||
tags: [db, postgresql] | ||
|
||
- name: yum | MD5-encrypted password for PostgreSQL 1 | ||
become: yes | ||
replace: | ||
dest: /var/lib/pgsql/9.4/data/pg_hba.conf | ||
regexp: ^(host.*all.*all.*127.0.0.1\/32.*)ident$ | ||
replace: \1md5 | ||
tags: [db, postgresql] | ||
|
||
- name: yum | MD5-encrypted password for PostgreSQL 2 | ||
become: yes | ||
replace: | ||
dest: /var/lib/pgsql/9.4/data/pg_hba.conf | ||
regexp: ^(host.*all.*all.*::1\/128.*)ident$ | ||
replace: \1md5 | ||
tags: [db, postgresql] | ||
|
||
- name: yum | Start and Enable PostgreSQL-9.4 | ||
become: yes | ||
service: | ||
name: postgresql-9.4 | ||
state: started | ||
enabled: yes | ||
tags: [db, postgresql] | ||
|
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,42 @@ | ||
--- | ||
- name: yum | Install PostgreSQL | ||
become: yes | ||
yum: | ||
name: "{{ item }}" | ||
state: installed | ||
with_items: | ||
- postgresql-server | ||
- postgresql-contrib | ||
- postgresql-devel | ||
register: install_postgresql | ||
tags: [db, postgresql] | ||
|
||
- name: yum | Initialize PostgreSQL | ||
become: yes | ||
command: postgresql-setup initdb | ||
when: install_postgresql.changed | ||
tags: [db, postgresql] | ||
|
||
- name: yum | MD5-encrypted password for PostgreSQL 1 | ||
become: yes | ||
replace: | ||
dest: /var/lib/pgsql/data/pg_hba.conf | ||
regexp: ^(host.*all.*all.*127.0.0.1\/32.*)ident$ | ||
replace: \1md5 | ||
tags: [db, postgresql] | ||
|
||
- name: yum | MD5-encrypted password for PostgreSQL 2 | ||
become: yes | ||
replace: | ||
dest: /var/lib/pgsql/data/pg_hba.conf | ||
regexp: ^(host.*all.*all.*::1\/128.*)ident$ | ||
replace: \1md5 | ||
tags: [db, postgresql] | ||
|
||
- name: yum | Start and Enable PostgreSQL | ||
become: yes | ||
service: | ||
name: postgresql | ||
state: started | ||
enabled: yes | ||
tags: [db, postgresql] |
File renamed without changes.
File renamed without changes.
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,22 @@ | ||
--- | ||
galaxy_info: | ||
description: Install custom OpenStack Mistral, patched by StackStorm | ||
author: armab | ||
company: StackStorm | ||
license: Apache | ||
min_ansible_version: 2.2 | ||
tags: st2mistral | ||
platforms: | ||
- name: Ubuntu | ||
versions: | ||
- trusty | ||
- xenial | ||
- name: EL | ||
versions: | ||
- 6 | ||
- 7 | ||
categories: | ||
- system | ||
dependencies: | ||
- role: postgresql | ||
- role: st2repos |
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
2 changes: 1 addition & 1 deletion
2
.../mistral/templates/init_mistral_db.SQL.j2 → ...2mistral/templates/init_mistral_db.SQL.j2
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,2 +1,2 @@ | ||
CREATE ROLE {{ mistral_db_username }} WITH CREATEDB LOGIN ENCRYPTED PASSWORD {{ mistral_db_password }}; | ||
CREATE ROLE {{ mistral_db_username }} WITH CREATEDB LOGIN ENCRYPTED PASSWORD '{{ mistral_db_password }}'; | ||
CREATE DATABASE {{ mistral_db }} OWNER {{ mistral_db_username }}; |
Oops, something went wrong.