Public Repository

Last pushed: 4 months ago
Short Description
Jenkins 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
USER_NAME=git-username
USER_EMAIL=git email
USER_CREDENTIALS=credential user to login jenkins or nothing in format : --user <uname> --password <passwd> of one of the admins user
ANSIBLE_HOSTNAME=ansible name
HOSTNAME=machine name
RIGLETDOMAIN=macine domain
PRESTART_JENKINS=Flag defines if Jenkins has to start before/after the ansible procedure (default: "true")
RESTART_JENKINS_AFTER_ANSIBLE=Flag defines if Jenkins 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
PLUGINS_TEXT_FILE_URL=plugin text file to be defined in format by line as plugin:version, no ssl credentials are provided to wget

VOLUMES : '/var/jenkins_home'

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 8080:8080 -p 50000:50000 --privileged -e "PRIVATE_PUBLIC_KEY_TAR_URL=https://github.com/f..../keys.tar" -e "PLUGINS_TEXT_FILE_URL=https://github.com/f..../plugins.txt" -e .... -e ....... -e "container=docker" --cap-add SYS_ADMIN --security-opt seccomp:unconfined -v /sys/fs/cgroup:/sys/fs/cgroup -it --name my-jenkins-ansible builditftorelli/jenkins-ansible:x.xxx.xx

Docker Pull Command
Owner
builditftorelli

Comments (0)