Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
poc_irods
poc-irods
Commits
16c88369
Commit
16c88369
authored
Nov 12, 2020
by
viscapi
Browse files
Now using postgresql_version variable on CentOS 7
parent
2c0cb2f6
Changes
3
Hide whitespace changes
Inline
Side-by-side
postgresql/tasks/db_init.yml
View file @
16c88369
...
...
@@ -13,7 +13,7 @@
when
:
ansible_facts['distribution'] == "Debian"
-
name
:
Initialization of ICAT database on CentOS
7
command
:
/usr/pgsql-
9.6
/bin/initdb -D {{path_to_icat}}
command
:
/usr/pgsql-
{{ postgresql_version }}
/bin/initdb -D {{path_to_icat}}
become
:
true
become_user
:
postgres
when
:
(ansible_facts['distribution'] == "CentOS" and ansible_facts['distribution_major_version'] == "7" and stat_result_centos.stat.exists == False)
...
...
postgresql/tasks/packages.yml
View file @
16c88369
---
-
name
:
Install PostgreSQL 9.6 packages for CentOS
7
-
name
:
Print PostgreSQL version
debug
:
msg
:
'
{{
postgresql_version
|
replace(".",
"")
}}'
-
name
:
Install PostgreSQL "{{ postgresql_version }}" packages for CentOS
7
yum
:
conf_file
:
'
/etc/yum.conf'
name
:
-
libselinux-python
-
python-pip
-
postgresql
96
-
postgresql
96
-server
-
postgresql
96
-odbc
-
'
postgresql
{{
postgresql_version
|
replace(".",
"")
}}'
-
'
postgresql
{{
postgresql_version
|
replace(".",
"")
}}
-server
'
-
'
postgresql
{{
postgresql_version
|
replace(".",
"")
}}
-odbc
'
state
:
present
when
:
(ansible_facts['distribution'] == "CentOS" and ansible_facts['distribution_major_version'] == "7")
...
...
postgresql/tasks/systemd.yml
View file @
16c88369
...
...
@@ -2,7 +2,7 @@
-
name
:
Set PGDATA environment variable on CentOS
7
lineinfile
:
path
:
/usr/lib/systemd/system/postgresql-
9.6
.service
path
:
/usr/lib/systemd/system/postgresql-
{{ postgresql_version }}
.service
regexp
:
'
^Environment=PGDATA='
line
:
'
Environment=PGDATA={{path_to_icat}}'
when
:
(ansible_facts['distribution'] == "CentOS" and ansible_facts['distribution_major_version'] == "7")
...
...
@@ -16,7 +16,7 @@
-
name
:
Start postgresql-9.6 service on CentOS
7
systemd
:
name
:
postgresql-
9.6
name
:
postgresql-
{{ postgresql_version }}
state
:
started
daemon_reload
:
yes
enabled
:
yes
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment