Sign inSign up

atefhaloui/ansible-aws

By atefhaloui

•Updated over 1 year ago

Image
0

197

atefhaloui/ansible-aws repository overview

All credits to https://github.com/willhallonline/docker-ansible⁠ Just added the required steps for aws integration:

# pull base image
FROM alpine:3.21

ARG ANSIBLE_CORE_VERSION=2.18.4
ARG ANSIBLE_VERSION=11.4.0
ARG ANSIBLE_LINT=25.2.1
ENV ANSIBLE_CORE_VERSION ${ANSIBLE_CORE_VERSION}
ENV ANSIBLE_VERSION ${ANSIBLE_VERSION}
ENV ANSIBLE_LINT ${ANSIBLE_LINT}

# Labels.
LABEL maintainer="[email protected]" \
    org.label-schema.schema-version="1.0" \
    org.label-schema.build-date=$BUILD_DATE \
    org.label-schema.vcs-ref=$VCS_REF \
    org.label-schema.name="willhallonline/ansible" \
    org.label-schema.description="Ansible inside Docker" \
    org.label-schema.url="https://github.com/willhallonline/docker-ansible" \
    org.label-schema.vcs-url="https://github.com/willhallonline/docker-ansible" \
    org.label-schema.vendor="Will Hall Online" \
    org.label-schema.docker.cmd="docker run --rm -it -v $(pwd):/ansible ~/.ssh/id_rsa:/root/id_rsa willhallonline/ansible"

RUN apk --no-cache add \
        sudo \
        curl \
        python3\
        py3-pip \
        openssl \
        ca-certificates \
        sshpass \
        openssh-client \
        rsync \
        git && \
    apk --no-cache add --virtual build-dependencies \
        python3-dev \
        libffi-dev \
        musl-dev \
        gcc \
        cargo \
        build-base && \
    find /usr/lib/python* -name "EXTERNALLY-MANAGED" -exec rm {} \; && \
    pip3 install --upgrade pip wheel && \
    pip3 install --upgrade cryptography cffi pywinrm && \
    pip3 install ansible-core==${ANSIBLE_CORE_VERSION} ansible==${ANSIBLE_VERSION} ansible-lint==${ANSIBLE_LINT} && \
    pip3 install mitogen jmespath && \
    apk del build-dependencies && \
    rm -rf /var/cache/apk/* && \
    rm -rf /root/.cache/pip && \
    rm -rf /root/.cargo

RUN mkdir /ansible && \
    mkdir -p /etc/ansible && \
    echo 'localhost' > /etc/ansible/hosts

# Install AWS CLI & SDK
RUN curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" && \
    unzip ./awscliv2.zip && \
    rm -f ./awscliv2.zip && \
    ./aws/install -i /usr/local/aws -b /bin && \
    rm -rf ./aws

# Install boto3, botocore
RUN pip install --no-cache-dir boto3 botocore

WORKDIR /ansible

CMD [ "ansible-playbook", "--version" ]

Tag summary

Content type

Image

Digest

sha256:4dd71a3cb…

Size

199.7 MB

Last updated

over 1 year ago

docker pull atefhaloui/ansible-aws