remove postgres integration
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Robert Kaussow 2019-10-27 16:04:40 +01:00
parent 284c311004
commit 426bbac53f
3 changed files with 12 additions and 75 deletions

View File

@ -1,5 +1,5 @@
--- ---
droneci_version: 1.4.0 droneci_version: 1.6.0
droneci_service_directory: /var/lib/docker/services/drone-ci droneci_service_directory: /var/lib/docker/services/drone-ci
droneci_docker_socket_path: /var/run/docker.sock droneci_docker_socket_path: /var/run/docker.sock
droneci_host: http://localhost droneci_host: http://localhost
@ -35,40 +35,14 @@ droneci_agent_capacity: 2
droneci_agent_privileged: False droneci_agent_privileged: False
droneci_postgres_enabled: False droneci_db_type: pgsql
droneci_postgres_ssl_mode: disable droneci_db_port: 5432
droneci_postgres_server: postgres.example.com droneci_db_name: droneci
droneci_postgres_port: 5432 droneci_db_user: pgdroneci
droneci_postgres_superuser: postgres droneci_db_password: secure
droneci_postgres_password: secure
droneci_postgres_db: droneci_db_ssl_mode: disable
name: droneci droneci_db_server: localhost
lc_collate: en_US.UTF-8
lc_ctype: en_US.UTF-8'
encoding: UTF-8
template: template0
login_host: localhost
login_user: "{{ droneci_postgres_superuser }}"
login_password: "{{ droneci_postgres_password }}"
# login_unix_socket: # defaults to not set
port: "{{ droneci_postgres_port }}"
# owner: # defaults to not set
state: present
droneci_postgres_user:
name: pgdroneci
password: droneci
encrypted: 'yes'
# priv: # defaults to not set
# role_attr_flags: # defaults to not set
db: "{{ droneci_postgres_db.name }}"
login_host: localhost
login_user: "{{ droneci_postgres_superuser }}"
login_password: "{{ droneci_postgres_password }}"
# login_unix_socket: # defaults to not set
port: "{{ droneci_postgres_port }}"
state: present
droneci_gitea_enabled: False droneci_gitea_enabled: False
droneci_gitea_server: http://my-git.example.com droneci_gitea_server: http://my-git.example.com

View File

@ -12,40 +12,3 @@
state: present state: present
become: True become: True
become_user: root become_user: root
- block:
- name: Setup postgres db '{{ droneci_postgres_db.name }}'
postgresql_db:
name: "{{ droneci_postgres_db.name }}"
lc_collate: "{{ droneci_postgres_db.lc_collate | default('en_US.UTF-8') }}"
lc_ctype: "{{ droneci_postgres_db.lc_ctype | default('en_US.UTF-8') }}"
encoding: "{{ droneci_postgres_db.encoding | default('UTF-8') }}"
template: "{{ droneci_postgres_db.template | default('template0') }}"
login_host: "{{ droneci_postgres_db.login_host | default('localhost') }}"
login_password: "{{ droneci_postgres_db.login_password | default(omit) }}"
login_user: "{{ droneci_postgres_db.login_user | default(postgresql_user) }}"
login_unix_socket: "{{ droneci_postgres_db.login_unix_socket | default(omit) }}"
port: "{{ droneci_postgres_db.port | default(omit) }}"
owner: "{{ droneci_postgres_db.owner | default(omit) }}"
state: "{{ droneci_postgres_db.state | default('present') }}"
no_log: True
when: droneci_postgres_db is defined
- name: Setup postgres user '{{ droneci_postgres_user.name }}'
postgresql_user:
name: "{{ droneci_postgres_user.name }}"
password: "{{ 'md5' + (droneci_postgres_user.password + droneci_postgres_user.name) | hash('md5') }}"
encrypted: "{{ droneci_postgres_user.encrypted | default('yes') }}"
priv: "{{ droneci_postgres_user.priv | default(omit) }}"
role_attr_flags: "{{ droneci_postgres_user.role_attr_flags | default(omit) }}"
db: "{{ droneci_postgres_user.db | default(omit) }}"
login_host: "{{ droneci_postgres_user.login_host | default('localhost') }}"
login_password: "{{ droneci_postgres_user.login_password | default(omit) }}"
login_user: "{{ droneci_postgres_user.login_user | default(omit) }}"
login_unix_socket: "{{ droneci_postgres_user.login_unix_socket | default(omit) }}"
port: "{{ droneci_postgres_user.port | default(omit) }}"
state: "{{ droneci_postgres_user.state | default('present') }}"
no_log: True
when: droneci_postgres_user is defined
delegate_to: "{{ droneci_postgres_server }}"
when: droneci_postgres_enabled | bool

View File

@ -9,7 +9,7 @@ services:
ports: ports:
- {{ droneci_server_exposed_ip + ':' if droneci_server_exposed_ip is defined else '' }}{{ droneci_server_exposed_port }}:80 - {{ droneci_server_exposed_ip + ':' if droneci_server_exposed_ip is defined else '' }}{{ droneci_server_exposed_port }}:80
volumes: volumes:
{% if not droneci_postgres_enabled %} {% if droneci_db_type == "sqlite %}
- droneserver-data:/var/lib/drone/ - droneserver-data:/var/lib/drone/
{% endif %} {% endif %}
{% if droneci_license_key is defined %} {% if droneci_license_key is defined %}
@ -33,9 +33,9 @@ services:
- DRONE_LOGS_COLOR=true - DRONE_LOGS_COLOR=true
- DRONE_LOGS_PRETTY=true - DRONE_LOGS_PRETTY=true
- DRONE_TLS_AUTOCERT=false - DRONE_TLS_AUTOCERT=false
{% if droneci_postgres_enabled %} {% if droneci_db_type == "pgsql" %}
- DRONE_DATABASE_DRIVER=postgres - DRONE_DATABASE_DRIVER=postgres
- DRONE_DATABASE_DATASOURCE=postgres://{{ droneci_postgres_user.name }}:{{ droneci_postgres_user.password }}@{{ droneci_postgres_server }}/{{ droneci_postgres_db.name }}?sslmode={{ droneci_postgres_ssl_mode }} - DRONE_DATABASE_DATASOURCE=postgres://{{ droneci_db_user }}:{{ droneci_db_password }}@{{ droneci_db_server }}/{{ droneci_db_name }}?sslmode={{ droneci_db_ssl_mode }}
{% endif %} {% endif %}
{% if droneci_gitea_enabled %} {% if droneci_gitea_enabled %}
- DRONE_GITEA_SERVER={{ droneci_gitea_server }} - DRONE_GITEA_SERVER={{ droneci_gitea_server }}
@ -85,7 +85,7 @@ services:
mem_reservation: {{ droneci_agent_memory_reservation }} mem_reservation: {{ droneci_agent_memory_reservation }}
{% endif %} {% endif %}
{% if not droneci_postgres_enabled %} {% if droneci_db_type == "sqlite" %}
volumes: volumes:
droneserver-data: droneserver-data:
{% endif %} {% endif %}