forked from HewlettPackard/ilo-ansible-collection
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
24 lines (20 loc) · 791 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
FROM ubuntu
RUN apt-get update
RUN apt-get install software-properties-common -y
RUN apt-get update
RUN apt-add-repository ppa:ansible/ansible -y
RUN apt update
RUN apt install ansible -y
CMD ["echo","Container created"]
#For configuring the hosts file
RUN echo [hpe] >>[] /etc/ansible/hosts
RUN echo hpe1 baseuri=15.146.46.124 >> /etc/ansible/hosts
RUN echo [myhosts:children] >> /etc/ansible/hosts
RUN echo hpe >> /etc/ansible/hosts
RUN echo [myhosts:vars] >> /etc/ansible/hosts
RUN echo username=admin >> /etc/ansible/hosts
RUN echo password=admin123 >> /etc/ansible/hosts
#Building and Installing hpe.redfish collection
RUN ansible-galaxy collection build --force .
RUN ansible-galaxy collection install *.tar.gz
WORKDIR /root/.ansible/collections/ansible_collections/hpe/redfish