Ansible and terraform tool for gitlab CI/CD pipeline
7.6K
This image is build to be use with gitlab CI/CD pipeline. The target is to deploy terraform and ansible configuration with gitlab CI/CD.
Build from python:latest
Added packages:
nano
openssl
unzip
iputils-ping
make
go
ansible
ansible-lint
terraform
workdir = /root
Starting the wikijs instance listening on port 80 is as easy as the following:
docker run -d --restart=unless-stopped tlnk/mgm-infra
The exemple below show ansible integration with 2 step
stages:
- job-ansible-lint
- job-ansible-deploy
job-ansible-lint:
stage: job-ansible-lint
image: tlnk/mgm-infra
script:
- cp -r /builds/gitlabusername/infrastructure/ansible /root/ansible
- cd /root/ansible
- ansible-lint *.yml -v
only:
refs:
- master
changes:
- ansible/*
job-ansible-deploy:
stage: job-ansible-deploy
image: tlnk/mgm-infra
script:
- eval $(ssh-agent -s)
- touch /root/.ssh/id_rsa
- echo "$SSH_PRIVATE_KEY" > /root/.ssh/id_rsa
- chmod 600 /root/.ssh/id_rsa
- ansible-playbook -i /etc/ansible/terraform.py -u root ansible/infra.yml
when: on_success
only:
refs:
- master
changes:
- ansible/*
Content type
Image
Digest
Size
698.7 MB
Last updated
about 5 years ago
docker pull tlnk/mgm-infra