Fix: aws
All checks were successful
Ansible Playbook lint / ansible-lint (push) Successful in 14s

This commit is contained in:
2024-12-20 22:34:05 +08:00
parent c5e237b9ff
commit c014a0b76e
17 changed files with 199 additions and 68 deletions

View File

@@ -1,7 +1,7 @@
---
- name: Init PostgreSQL
ansible.builtin.command: |
initdb --locale=C.UTF-8 --encoding=UTF8 -D /var/lib/postgres/data
initdb -D /var/lib/postgres/data
args:
creates: /var/lib/postgres/data/PG_VERSION
become: true
@@ -31,12 +31,13 @@
role: cmsuser
privs: ALL
objs: ALL_IN_SCHEMA
- name: CMS init DB
ansible.builtin.shell: |
sudo -iu cmsuser <<EOF
cmsInitDB
EOF
- name: Check is CMS DB initialized
community.postgresql.postgresql_table:
db: cmsdb
table: admins
become: true
become_user: cmsuser
register: ret
changed_when: ret.rc != 0
become_user: postgres
check_mode: true
notify: CMS init DB
- name: Flush handlers
ansible.builtin.meta: flush_handlers