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
9d322442
Commit
9d322442
authored
Nov 17, 2020
by
viscapi
Browse files
Systemd module now compatible with both stock and external PostgreSQL
parent
3af57edc
Changes
1
Hide whitespace changes
Inline
Side-by-side
postgresql/tasks/systemd.yml
View file @
9d322442
...
...
@@ -2,10 +2,17 @@
-
name
:
Set PGDATA environment variable on CentOS
7
lineinfile
:
path
:
/usr/lib/systemd/system/postgresql-{{ postgresql_version }}.service
path
:
/usr/lib/systemd/system/postgresql.service
regexp
:
'
^Environment=PGDATA='
line
:
'
Environment=PGDATA={{path_to_icat}}'
when
:
(ansible_facts['distribution'] == "CentOS" and ansible_facts['distribution_major_version'] == "7" and use_distribution_postgresql)
-
name
:
Set PGDATA environment variable on CentOS
7
lineinfile
:
path
:
/usr/lib/systemd/system/postgresql-{{ external_postgresql_version }}.service
regexp
:
'
^Environment=PGDATA='
line
:
'
Environment=PGDATA={{path_to_icat}}'
when
:
(ansible_facts['distribution'] == "CentOS" and ansible_facts['distribution_major_version'] == "7")
when
:
(ansible_facts['distribution'] == "CentOS" and ansible_facts['distribution_major_version'] == "7"
and not use_distribution_postgresql
)
-
name
:
Set PGDATA environment variable on CentOS
8
lineinfile
:
...
...
@@ -14,13 +21,21 @@
line
:
'
Environment=PGDATA={{path_to_icat}}'
when
:
(ansible_facts['distribution'] == "CentOS" and ansible_facts['distribution_major_version'] == "8")
-
name
:
Start postgresql service on CentOS
7
systemd
:
name
:
postgresql
state
:
started
daemon_reload
:
yes
enabled
:
yes
when
:
(ansible_facts['distribution'] == "CentOS" and ansible_facts['distribution_major_version'] == "7" and use_distribution_postgresql)
-
name
:
Start postgresql-{{ postgresql_version }} service on CentOS
7
systemd
:
name
:
postgresql-{{ postgresql_version }}
name
:
postgresql-{{
external_
postgresql_version }}
state
:
started
daemon_reload
:
yes
enabled
:
yes
when
:
(ansible_facts['distribution'] == "CentOS" and ansible_facts['distribution_major_version'] == "7")
when
:
(ansible_facts['distribution'] == "CentOS" and ansible_facts['distribution_major_version'] == "7"
and not use_distribution_postgresql
)
-
name
:
Start postgresql service on CentOS
8
systemd
:
...
...
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