create tasks for cron extension
This commit is contained in:
parent
1a01afde95
commit
f1971a75b5
@ -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"
|
||||
13
roles/common/tasks/postgres_cron.yml
Normal file
13
roles/common/tasks/postgres_cron.yml
Normal 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 }}"
|
||||
Loading…
Reference in New Issue
Block a user