create tasks for cron extension

This commit is contained in:
Tobias Lehmann 2024-04-16 11:50:28 +02:00
parent 1a01afde95
commit f1971a75b5
2 changed files with 31 additions and 3 deletions

View File

@ -50,8 +50,7 @@
lxc_ip: 192.168.150.130
postgresql_admin_password: captica
postgresql_allowed_hosts:
- '192.168.150.1/32'
- '192.168.110.1/32'
- '0.0.0.0/0'
timescaledb_database_name: datalogger
timescaledb_database_schema: captica
timescaledb_database_user: captica
@ -61,3 +60,19 @@
- root
roles:
- timescaledb
- hosts: "timescaledb"
vars:
lxc_ip: 192.168.150.130
postgresql_admin_password: captica
postgresql_allowed_hosts:
- '0.0.0.0/0'
timescaledb_database_name: datalogger
timescaledb_database_schema: captica
timescaledb_database_user: captica
timescaledb_database_password: captica
tools_install_users:
- ansible
- root
tasks:
- import_tasks: "../roles/common/tasks/postgres_cron.yml"

View File

@ -0,0 +1,13 @@
- name: "Create pg_cron extension {{ timescaledb_database_name }}"
tags:
- install
- timescaledb_install
- postgres_extension
postgresql_ext:
name: pg_cron
db: "{{ timescaledb_database_name }}"
schema: "{{ timescaledb_database_schema }}"
state: present
login_user: "{{ timescaledb_database_user }}"
login_password: "{{ timescaledb_database_password }}"
login_host: "{{ lxc_ip }}"