mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
Iiab (#68)
* xs- goes to iiab- * more xs->iiab * sysconfig was forgotten * hyphen vs underscore i roles network templates * bulk sed on pgsql-xs * create links for old script names * missed named-xs -> named-iiab * squid-xs ->squid-iiab * misspelled squid-iiab.conf.j2
This commit is contained in:
parent
909439f40b
commit
4462652deb
36 changed files with 110 additions and 104 deletions
|
@ -18,15 +18,15 @@
|
|||
tags:
|
||||
- download
|
||||
|
||||
- name: Create postgresql-xs systemd service
|
||||
template: src=postgresql-xs.service
|
||||
dest=/etc/systemd/system/postgresql-xs.service
|
||||
- name: Create postgresql-iiab systemd service
|
||||
template: src=postgresql-iiab.service
|
||||
dest=/etc/systemd/system/postgresql-iiab.service
|
||||
owner=root
|
||||
group=root
|
||||
mode=0644
|
||||
|
||||
- name: Create postgres data directory
|
||||
file: path=/library/pgsql-xs
|
||||
file: path=/library/pgsql-iiab
|
||||
owner=postgres
|
||||
group=postgres
|
||||
mode=0700
|
||||
|
@ -42,24 +42,24 @@
|
|||
when: is_debuntu
|
||||
|
||||
- name: Initialize the postgres db
|
||||
command: su - postgres -c "/usr/lib/postgresql/9.4/bin/initdb -E 'UTF-8' --locale={{ postgresql_locale }} -D /library/pgsql-xs"
|
||||
creates=/library/pgsql-xs/pg_hba.conf
|
||||
command: su - postgres -c "/usr/lib/postgresql/9.4/bin/initdb -E 'UTF-8' --locale={{ postgresql_locale }} -D /library/pgsql-iiab"
|
||||
creates=/library/pgsql-iiab/pg_hba.conf
|
||||
when: is_debian
|
||||
|
||||
- name: Initialize the postgres db
|
||||
command: su - postgres -c "/usr/lib/postgresql/9.5/bin/initdb -E 'UTF-8' --locale={{ postgresql_locale }} -D /library/pgsql-xs"
|
||||
creates=/library/pgsql-xs/pg_hba.conf
|
||||
command: su - postgres -c "/usr/lib/postgresql/9.5/bin/initdb -E 'UTF-8' --locale={{ postgresql_locale }} -D /library/pgsql-iiab"
|
||||
creates=/library/pgsql-iiab/pg_hba.conf
|
||||
when: is_ubuntu
|
||||
|
||||
- name: Initialize the postgres db
|
||||
command: su - postgres -c "/usr/bin/initdb -E 'UTF-8' --lc-collate={{ postgresql_locale }} --lc-ctype={{ postgresql_locale }} -D /library/pgsql-xs"
|
||||
creates=/library/pgsql-xs/pg_hba.conf
|
||||
command: su - postgres -c "/usr/bin/initdb -E 'UTF-8' --lc-collate={{ postgresql_locale }} --lc-ctype={{ postgresql_locale }} -D /library/pgsql-iiab"
|
||||
creates=/library/pgsql-iiab/pg_hba.conf
|
||||
when: not is_debuntu
|
||||
|
||||
- name: Configure postgres
|
||||
template: backup=yes
|
||||
src=postgresql.conf.j2
|
||||
dest=/library/pgsql-xs/postgresql.conf
|
||||
dest=/library/pgsql-iiab/postgresql.conf
|
||||
owner=postgres
|
||||
group=postgres
|
||||
mode=0640
|
||||
|
@ -69,8 +69,8 @@
|
|||
state=stopped
|
||||
enabled=no
|
||||
|
||||
- name: Start and enable postgresql-xs service
|
||||
service: name=postgresql-xs
|
||||
- name: Start and enable postgresql-iiab service
|
||||
service: name=postgresql-iiab
|
||||
state=started
|
||||
enabled=yes
|
||||
when: postgresql_enabled
|
||||
|
|
|
@ -25,7 +25,7 @@ Environment=PG_OOM_ADJUST_VALUE=0
|
|||
# PGSTARTTIMEOUT should be less than TimeoutSec value.
|
||||
Environment=PGSTARTTIMEOUT=270
|
||||
|
||||
Environment=PGDATA=/library/pgsql-xs
|
||||
Environment=PGDATA=/library/pgsql-iiab
|
||||
|
||||
ExecStart=/usr/lib/postgresql/{{ postgresql_version }}/bin/pg_ctl start -D ${PGDATA} -s -w -t ${PGSTARTTIMEOUT}
|
||||
ExecStop=/usr/lib/postgresql/{{ postgresql_version }}/bin/pg_ctl stop -D ${PGDATA} -s -m fast
|
||||
|
@ -42,5 +42,5 @@ WantedBy=multi-user.target
|
|||
# --postgres_xs.service
|
||||
.include /usr/lib/systemd/system/postgresql.service
|
||||
[Service]
|
||||
Environment=PGDATA=/library/pgsql-xs
|
||||
Environment=PGDATA=/library/pgsql-iiab
|
||||
{% endif %}
|
Loading…
Add table
Add a link
Reference in a new issue