Sign inSign up

eliamanara/ubuntu_ansible

By eliamanara

•Updated over 4 years ago

Image
0

195

eliamanara/ubuntu_ansible repository overview

The Dockerfile for this image:

FROM ubuntu:18.04

RUN apt-get -qy update
RUN apt install -qy python software-properties-common git
RUN apt-add-repository --yes --update ppa:ansible/ansible
RUN apt install -qy ansible ansible-lint
RUN apt install -qy iputils-ping

CMD ["/bin/bash"]

Use the image in a pipeline as follows:

variables:
    ANSIBLE_HOST_KEY_CHECKING: 'false'
    ANSIBLE_FORCE_COLOR: 'true'
    ANSIBLE_PYTHON_INTERPRRTER: /usr/bin/python3

image: eliamanara/ubuntu_ansible

before_script:
  - whoami
  - apt-get update -qy
  - ansible --version
  - ansible-lint --version
  - mkdir secret
  - echo "${ANSIBLE_SSHKEY}" > secret/ansible.key
  - chmod 400 secret/ansible.key
  - export ANSIBLE_HOST_KEY_CHECKING=False

my_job:
  stage: my_stage
  script:
    - ansible all --inventory inventory -m ping

Tag summary

Content type

Image

Digest

Size

132.5 MB

Last updated

over 4 years ago

docker pull eliamanara/ubuntu_ansible