weareinteractive / ansible-docker

Ansible role which installs docker
MIT License
14 stars 8 forks source link

How to add support for Amazon AMI ? #4

Open cadesalaberry opened 7 years ago

cadesalaberry commented 7 years ago

I would gladly make a PR, but I haven't had time to look it up into details.

Here are more info on my system:

# uname -a
Linux ip-172-31-17-20 4.4.41-36.55.amzn1.x86_64 #1 SMP Wed Jan 18 01:03:26 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
# cat /etc/*-release
NAME="Amazon Linux AMI"
VERSION="2016.09"
ID="amzn"
ID_LIKE="rhel fedora"
VERSION_ID="2016.09"
PRETTY_NAME="Amazon Linux AMI 2016.09"
ANSI_COLOR="0;33"
CPE_NAME="cpe:/o:amazon:linux:2016.09:ga"
HOME_URL="http://aws.amazon.com/amazon-linux-ami/"
Amazon Linux AMI release 2016.09

And the steps to install docker:

[ec2-user ~]$ sudo yum update -y

# Install Docker.
[ec2-user ~]$ sudo yum install -y docker

# Start the Docker service.
[ec2-user ~]$ sudo service docker start
Starting cgconfig service:                                 [  OK  ]
Starting docker:                                       [  OK  ]

# Add the ec2-user to the docker group so you can execute Docker commands without using sudo.
[ec2-user ~]$ sudo usermod -a -G docker ec2-user

I'll keep this issue as a reference if I find time to implement it.

franklinkim commented 7 years ago

Hi, the installation depends on ansible_distribution for either Debian and Ubuntu or Suse and openSUSE. You'd need to add another one for your distribution.