File tree Expand file tree Collapse file tree 6 files changed +72
-37
lines changed Expand file tree Collapse file tree 6 files changed +72
-37
lines changed Original file line number Diff line number Diff line change @@ -141,4 +141,4 @@ MIT / BSD
141
141
142
142
## Author Information
143
143
144
- This role was created in 2014 by [ Jeff Geerling] ( http://jeffgeerling.com/ ) , author of [ Ansible for DevOps] ( http ://ansiblefordevops.com/) .
144
+ This role was created in 2014 by [ Jeff Geerling] ( http://jeffgeerling.com/ ) , author of [ Ansible for DevOps] ( https ://www. ansiblefordevops.com/) .
Original file line number Diff line number Diff line change 1
1
FROM centos:6
2
+ MAINTAINER Jeff Geerling
2
3
3
4
# Install Ansible
4
- RUN yum -y update; yum clean all;
5
- RUN yum -y install epel-release
6
- RUN yum -y install git ansible sudo
7
- RUN yum clean all
5
+ RUN yum makecache fast \
6
+ && yum -y install deltarpm epel-release \
7
+ && yum -y update \
8
+ && yum -y install \
9
+ ansible \
10
+ sudo \
11
+ && yum clean all
8
12
9
13
# Disable requiretty
10
14
RUN sed -i -e 's/^\(Defaults\s*requiretty\)/#--- \1/' /etc/sudoers
Original file line number Diff line number Diff line change 1
1
FROM centos:7
2
+ MAINTAINER Jeff Geerling
3
+ ENV container=docker
2
4
3
5
# Install systemd -- See https://hub.docker.com/_/centos/
4
- RUN yum -y swap -- remove fakesystemd -- install systemd systemd-libs
5
- RUN yum -y update; yum clean all; \
6
- (cd /lib/systemd/system/sysinit.target.wants/; for i in *; do [ $i == systemd-tmpfiles-setup.service ] || rm -f $i; done); \
7
- rm -f /lib/systemd/system/multi-user.target.wants/*; \
8
- rm -f /etc/systemd/system/*.wants/*; \
6
+ RUN (cd /lib/systemd/system/sysinit.target.wants/; for i in *; do [ $i == systemd-tmpfiles-setup.service ] || rm -f $i; done); \
7
+ rm -f /lib/systemd/system/multi-user.target.wants/*;\
8
+ rm -f /etc/systemd/system/*.wants/*;\
9
9
rm -f /lib/systemd/system/local-fs.target.wants/*; \
10
10
rm -f /lib/systemd/system/sockets.target.wants/*udev*; \
11
11
rm -f /lib/systemd/system/sockets.target.wants/*initctl*; \
12
- rm -f /lib/systemd/system/basic.target.wants/*; \
12
+ rm -f /lib/systemd/system/basic.target.wants/*;\
13
13
rm -f /lib/systemd/system/anaconda.target.wants/*;
14
14
15
- # Install Ansible
16
- RUN yum -y install epel-release
17
- RUN yum -y install git ansible sudo
18
- RUN yum clean all
15
+ # Install Ansible and other requirements.
16
+ RUN yum makecache fast \
17
+ && yum -y install deltarpm epel-release initscripts \
18
+ && yum -y update \
19
+ && yum -y install \
20
+ ansible \
21
+ sudo \
22
+ && yum clean all
19
23
20
24
# Disable requiretty
21
25
RUN sed -i -e 's/^\(Defaults\s*requiretty\)/#--- \1/' /etc/sudoers
Original file line number Diff line number Diff line change 1
1
FROM ubuntu:12.04
2
- RUN apt-get update
2
+ MAINTAINER Jeff Geerling
3
3
4
- # Install Ansible
5
- RUN apt-get install -y software-properties-common python-software-properties git
6
- RUN apt-add-repository -y ppa:ansible/ansible
7
- RUN apt-get update
8
- RUN apt-get install -y ansible
4
+ ENV DEBIAN_FRONTEND noninteractive
9
5
10
- COPY initctl_faker .
11
- RUN chmod +x initctl_faker && rm -fr /sbin/initctl && ln -s /initctl_faker /sbin/initctl
6
+ RUN apt-get update \
7
+ && apt-get install -y --no-install-recommends \
8
+ software-properties-common \
9
+ python-software-properties \
10
+ && rm -rf /var/lib/apt/lists/* \
11
+ && rm -Rf /usr/share/doc && rm -Rf /usr/share/man \
12
+ && apt-get clean
13
+ # Install Ansible
14
+ RUN apt-add-repository -y ppa:ansible/ansible \
15
+ && apt-get update \
16
+ && apt-get install -y --no-install-recommends \
17
+ ansible \
18
+ && rm -rf /var/lib/apt/lists/* \
19
+ && rm -Rf /usr/share/doc && rm -Rf /usr/share/man \
20
+ && touch -m -t 200101010101.01 /var/lib/apt/periodic/update-success-stamp \
21
+ && apt-get clean
12
22
13
23
# Install Ansible inventory file
14
24
RUN echo "[local]\nlocalhost ansible_connection=local" > /etc/ansible/hosts
Original file line number Diff line number Diff line change 1
1
FROM ubuntu:14.04
2
- RUN apt-get update
2
+ MAINTAINER Jeff Geerling
3
3
4
- # Install Ansible
5
- RUN apt-get install -y software-properties-common git
6
- RUN apt-add-repository -y ppa:ansible/ansible
7
- RUN apt-get update
8
- RUN apt-get install -y ansible
4
+ ENV DEBIAN_FRONTEND noninteractive
9
5
10
- COPY initctl_faker .
11
- RUN chmod +x initctl_faker && rm -fr /sbin/initctl && ln -s /initctl_faker /sbin/initctl
6
+ RUN apt-get update \
7
+ && apt-get install -y --no-install-recommends \
8
+ software-properties-common \
9
+ && rm -Rf /var/lib/apt/lists/* \
10
+ && rm -Rf /usr/share/doc && rm -Rf /usr/share/man \
11
+ && apt-get clean
12
+ # Install Ansible
13
+ RUN apt-add-repository -y ppa:ansible/ansible \
14
+ && apt-get update \
15
+ && apt-get install -y --no-install-recommends \
16
+ ansible \
17
+ && rm -rf /var/lib/apt/lists/* \
18
+ && rm -Rf /usr/share/doc && rm -Rf /usr/share/man \
19
+ && apt-get clean
12
20
13
21
# Install Ansible inventory file
14
22
RUN echo "[local]\nlocalhost ansible_connection=local" > /etc/ansible/hosts
Original file line number Diff line number Diff line change 1
1
FROM ubuntu:16.04
2
2
3
3
# Install dependencies.
4
- RUN apt-get update -qq -y
5
- RUN apt-get install -qq -y python-software-properties software-properties-common \
6
- rsyslog systemd systemd-cron sudo
4
+ RUN apt-get update \
5
+ && apt-get install -y --no-install-recommends \
6
+ python-software-properties \
7
+ software-properties-common \
8
+ rsyslog systemd systemd-cron sudo \
9
+ && rm -Rf /var/lib/apt/lists/* \
10
+ && rm -Rf /usr/share/doc && rm -Rf /usr/share/man \
11
+ && apt-get clean
7
12
RUN sed -i 's/^\($ModLoad imklog\)/#\1/' /etc/rsyslog.conf
8
13
#ADD etc/rsyslog.d/50-default.conf /etc/rsyslog.d/50-default.conf
9
14
10
15
# Install Ansible
11
- RUN add-apt-repository -y ppa:ansible/ansible
12
- RUN apt-get update -y
13
- RUN apt-get install -y ansible git-core
16
+ RUN add-apt-repository -y ppa:ansible/ansible \
17
+ && apt-get update
18
+ && apt-get install -y --no-install-recommends \
19
+ ansible \
20
+ && rm -rf /var/lib/apt/lists/* \
21
+ && rm -Rf /usr/share/doc && rm -Rf /usr/share/man \
22
+ && apt-get clean
14
23
15
24
COPY initctl_faker .
16
25
RUN chmod +x initctl_faker && rm -fr /sbin/initctl && ln -s /initctl_faker /sbin/initctl
You can’t perform that action at this time.
0 commit comments