Public Repository

Last pushed: 7 months ago
Short Description
PostgreSQL powered by ansible procedures behalf git/github/bitbuclet/others repos
Full Description

You can define your playbook in a repo and pass to docker information to play the Ansible code.

Environment:
MAIN_REPO_URL='git@.......git'
MAIN_REPO_BRANCH=branch|master
MAIN_REPO_FOLDER=folder
ROLES_REPO_URL='git@.........git' \
ROLES_REPO_BRANCH=branch|master
ROLES_REPO_FOLDER=folder
PLAYBOOKS=relative yml files from master folder comma separated (without extensions)
USER_NAME=git-username
USER_EMAIL=git email
ANSIBLE_HOSTNAME=ansible name
HOSTNAME=machine name
RIGLETDOMAIN=macine domain
PRESTART_POSTGRES=Flag defines if PostgreSQL has to start before the ansible procedure (default: "true", it's suggested to avoid to change this value)
RESTART_POSTGRES_AFTER_ANSIBLE=Flag defines if PostgreSQL has to restart after the ansible procedure (default: "false")
PRIVATE_PUBLIC_KEY_TAR_URL=url to your tar, no ssl credentials are provided to wget
POSTGRES_OS_USER=overwrite system PostgreSQL owner user (default "", experimental and not tested)
POSTGRES_OS_GROUP=overwrite system PostgreSQL owner user group (default "", experimental and not tested)
POSTGRES_PASSWORD=PostgreSQL user password (default "mysecuritypassword)
POSTGRES_USER= PostgreSQL user ("postgres")
POSTGRES_DB=first database (default "postgres")
PGDATA=data folder (default "/var/lib/postgresql/data", changes not allowed!!)
POSTGRES_INITDB_ARGS= PostgreSQL database instance attributes (such as '--data-checksums')

VOLUMES : "/var/lib/postgresql/data", "/docker-entrypoint-initdb.d", "/postgres-entrypoint-initdb.d"
Respectly : db data folder, entry-point script folder, ansible script folder

We suppose you have three environment files in the master folder : vars, inputs and private. They are mandatory and they must be at least filled of one variable each.

Reference Repository:

https://github.com/fabriziotorelli-wipro/rig-docker-machines/tree/master/2/ansible-machines

Example:
docker run -d -p 5432:5432 --privileged -e "PRIVATE_PUBLIC_KEY_TAR_URL=https://github.com/f..../keys.tar" -e .... -e ....... -e "container=docker" --cap-add SYS_ADMIN --security-opt seccomp:unconfined -v /sys/fs/cgroup:/sys/fs/cgroup -it --name my-postgresql-ansible builditftorelli/postgresql-ansible:x.xxx.xx

Docker Pull Command
Owner
builditftorelli