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
8364ae22
Commit
8364ae22
authored
Nov 17, 2020
by
viscapi
Browse files
Installation of stock or external PostgreSQL on CentOS 7 and 8
parent
1de7c1d6
Changes
1
Hide whitespace changes
Inline
Side-by-side
postgresql/tasks/packages.yml
View file @
8364ae22
---
-
name
:
Print PostgreSQL version
debug
:
msg
:
'
{{
postgresql_version
|
replace(".",
"")
}}'
-
name
:
Install PostgreSQL {{ postgresql_version }} packages for CentOS
7
-
name
:
Install ancillary packages for CentOS
7
yum
:
conf_file
:
'
/etc/yum.conf'
name
:
name
:
-
libselinux-python
-
python-pip
-
'
postgresql{{
postgresql_version
|
replace(".",
"")
}}'
-
'
postgresql{{
postgresql_version
|
replace(".",
"")
}}-server'
state
:
present
when
:
(ansible_facts['distribution'] == "CentOS" and ansible_facts['distribution_major_version'] == "7")
-
name
:
Install PostgreSQL 10.6 packages for CentOS
8
-
name
:
Install PostgreSQL {{ external_postgresql_version }} packages for CentOS
7
yum
:
conf_file
:
'
/etc/yum.conf'
name
:
-
'
postgresql{{
external_postgresql_version
|
replace(".",
"")
}}'
-
'
postgresql{{
external_postgresql_version
|
replace(".",
"")
}}-server'
state
:
present
when
:
(ansible_facts['distribution'] == "CentOS" and ansible_facts['distribution_major_version'] == "7" and not use_distribution_postgresql)
-
name
:
Install PostgreSQL 9.2 packages for CentOS
7
yum
:
conf_file
:
'
/etc/yum.conf'
name
:
-
postgresql
-
postgresql-server
state
:
present
when
:
(ansible_facts['distribution'] == "CentOS" and ansible_facts['distribution_major_version'] == "7" and use_distribution_postgresql)
-
name
:
Install ancillary packages for CentOS
8
dnf
:
conf_file
:
'
/etc/dnf/dnf.conf'
name
:
-
python3-libselinux
-
python3-pip
state
:
present
when
:
(ansible_facts['distribution'] == "CentOS" and ansible_facts['distribution_major_version'] == "8")
-
name
:
Install PostgreSQL {{ external_postgresql_version }} packages for CentOS
8
dnf
:
conf_file
:
'
/etc/dnf/dnf.conf'
name
:
-
'
postgresql{{
external_postgresql_version
|
replace(".",
"")
}}'
-
'
postgresql{{
external_postgresql_version
|
replace(".",
"")
}}-server'
state
:
present
when
:
(ansible_facts['distribution'] == "CentOS" and ansible_facts['distribution_major_version'] == "8" and not use_distribution_postgresql)
-
name
:
Install PostgreSQL 10 packages for CentOS
8
dnf
:
conf_file
:
'
/etc/dnf/dnf.conf'
name
:
-
postgresql
-
postgresql-server
state
:
present
when
:
(ansible_facts['distribution'] == "CentOS" and ansible_facts['distribution_major_version'] == "8")
when
:
(ansible_facts['distribution'] == "CentOS" and ansible_facts['distribution_major_version'] == "8"
and use_distribution_postgresql
)
...
Write
Preview
Supports
Markdown
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