Skip to content

Instantly share code, notes, and snippets.

@SweBarre
Created April 5, 2017 13:41
Show Gist options
  • Save SweBarre/55e15240b0b0e291242f10916d13a862 to your computer and use it in GitHub Desktop.
Save SweBarre/55e15240b0b0e291242f10916d13a862 to your computer and use it in GitHub Desktop.
Docker file for ansible + ansible oneview module
FROM python:2.7
#install ansible
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 93C4A3FD7BB9C367 && \
echo "deb http://ppa.launchpad.net/ansible/ansible/ubuntu trusty main" > /etc/apt/sources.list.d/ansible.list && \
apt-get update && \
apt-get install --no-install-recommends -y \
ansible && \
rm -rf /var/lib/apt/lists/*
# Install hpOveView SDK
RUN pip install --no-cache-dir hpOneView
# install ansible oneview module
WORKDIR /root
ENV ONEVIEW_ANSIBLE_MODULE_VERSION 3.1.0
ENV ANSIBLE_LIBRARY /root/oneview-ansible-${ONEVIEW_ANSIBLE_MODULE_VERSION}/library
RUN wget https://github.com/HewlettPackard/oneview-ansible/archive/v${ONEVIEW_ANSIBLE_MODULE_VERSION}.tar.gz && \
tar xvzf v${ONEVIEW_ANSIBLE_MODULE_VERSION}.tar.gz && \
rm v${ONEVIEW_ANSIBLE_MODULE_VERSION}.tar.gz
VOLUME /root/playbooks
WORKDIR /root/playbooks
CMD ['/bin/bash']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment