Browse Source

Merge branch 'feature/init' of fxinnovation-public/ansible-role-docker into master

tags/0.0.1
Julien Cabillot Gitea 2 years ago
parent
commit
2f0d92dedc
19 changed files with 497 additions and 1 deletions
  1. +1
    -0
      Jenkinsfile
  2. +40
    -1
      README.md
  3. +22
    -0
      defaults/main.yml
  4. +28
    -0
      files/docker_centos_gpg
  5. +62
    -0
      files/docker_debian_gpg
  6. +3
    -0
      handlers/main.yml
  7. +104
    -0
      kitchen.yml
  8. +68
    -0
      meta/main.yml
  9. +7
    -0
      tasks/docker-compose.yml
  10. +7
    -0
      tasks/docker-users.yml
  11. +27
    -0
      tasks/main.yml
  12. +6
    -0
      tasks/setup-Amazon.yml
  13. +34
    -0
      tasks/setup-Debian.yml
  14. +60
    -0
      tasks/setup-RedHat.yml
  15. +7
    -0
      test/integration/default/amazon.rb
  16. +7
    -0
      test/integration/default/centos.rb
  17. +7
    -0
      test/integration/default/rhel.rb
  18. +5
    -0
      tests/test.yml
  19. +2
    -0
      vars/main.yml

+ 1
- 0
Jenkinsfile View File

@@ -0,0 +1 @@
fxPlaybook()

+ 40
- 1
README.md View File

@@ -1,2 +1,41 @@
# ansible-role-docker
ansible-role-docker
===================

Install docker for CentOS / RHEL / Amazon Linux 2.
Based on : https://github.com/geerlingguy/ansible-role-docker/
The geerlingguy role doesn't support RHEL and Amazon.

Requirements
------------

N/A

Role Variables
--------------

N/A

Dependencies
------------

N/A

Example Playbook
----------------

```yaml
tasks:
- name: 'Install Docker Engine'
include_role:
name: 'ansible-role-docker'
```

License
-------

MIT

Author Information
------------------

FXInnovation Inc

+ 22
- 0
defaults/main.yml View File

@@ -0,0 +1,22 @@
---
docker_edition: 'ce'
docker_package: 'docker-{{ docker_edition }}'
docker_package_state: present

docker_service_state: started
docker_service_enabled: true
docker_restart_handler_state: restarted

docker_install_compose: true
docker_compose_version: '1.24.0'
docker_compose_path: /usr/local/bin/docker-compose

docker_apt_release_channel: stable
docker_apt_arch: amd64
docker_apt_repository: "deb [arch={{ docker_apt_arch }}] https://download.docker.com/linux/{{ ansible_distribution|lower }} {{ ansible_distribution_release }} {{ docker_apt_release_channel }}"

docker_yum_repo_url: https://download.docker.com/linux/{{ (ansible_distribution == "Fedora") | ternary("fedora","centos") }}/docker-{{ docker_edition }}.repo
docker_yum_repo_enable_edge: 0
docker_yum_repo_enable_test: 0

docker_users: []

+ 28
- 0
files/docker_centos_gpg View File

@@ -0,0 +1,28 @@
-----BEGIN PGP PUBLIC KEY BLOCK-----

mQINBFit5IEBEADDt86QpYKz5flnCsOyZ/fk3WwBKxfDjwHf/GIflo+4GWAXS7wJ
1PSzPsvSDATV10J44i5WQzh99q+lZvFCVRFiNhRmlmcXG+rk1QmDh3fsCCj9Q/yP
w8jn3Hx0zDtz8PIB/18ReftYJzUo34COLiHn8WiY20uGCF2pjdPgfxE+K454c4G7
gKFqVUFYgPug2CS0quaBB5b0rpFUdzTeI5RCStd27nHCpuSDCvRYAfdv+4Y1yiVh
KKdoe3Smj+RnXeVMgDxtH9FJibZ3DK7WnMN2yeob6VqXox+FvKYJCCLkbQgQmE50
uVK0uN71A1mQDcTRKQ2q3fFGlMTqJbbzr3LwnCBE6hV0a36t+DABtZTmz5O69xdJ
WGdBeePCnWVqtDb/BdEYz7hPKskcZBarygCCe2Xi7sZieoFZuq6ltPoCsdfEdfbO
+VBVKJnExqNZCcFUTEnbH4CldWROOzMS8BGUlkGpa59Sl1t0QcmWlw1EbkeMQNrN
spdR8lobcdNS9bpAJQqSHRZh3cAM9mA3Yq/bssUS/P2quRXLjJ9mIv3dky9C3udM
+q2unvnbNpPtIUly76FJ3s8g8sHeOnmYcKqNGqHq2Q3kMdA2eIbI0MqfOIo2+Xk0
rNt3ctq3g+cQiorcN3rdHPsTRSAcp+NCz1QF9TwXYtH1XV24A6QMO0+CZwARAQAB
tCtEb2NrZXIgUmVsZWFzZSAoQ0UgcnBtKSA8ZG9ja2VyQGRvY2tlci5jb20+iQI3
BBMBCgAhBQJYrep4AhsvBQsJCAcDBRU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6uu+9H7NhbehBMhYnpNZyrHzCmzyXkauwRAqoCbGCNykTRwsur9gS41TQ
M8ssD1jFheOJf3hODnkKU+HKjvMROl1DK7zdmLdNzA1cvtZH/nCC9KPj1z8QC47S
xx+dTZSx4ONAhwbS/LN3PoKtn8LPjY9NP9uDWI+TWYquS2U+KHDrBDlsgozDbs/O
jCxcpDzNmXpWQHEtHU7649OXHP7UeNST1mCUCH5qdank0V1iejF6/CfTFU4MfcrG
YT90qFF93M3v01BbxP+EIY2/9tiIPbrd
=0YYh
-----END PGP PUBLIC KEY BLOCK-----

+ 3
- 0
handlers/main.yml View File

@@ -0,0 +1,3 @@
---
- name: restart docker
service: "name=docker state={{ docker_restart_handler_state }}"

+ 104
- 0
kitchen.yml View File

@@ -0,0 +1,104 @@
---

driver:
name: "ec2"
associate_public_ip: true
aws_ssh_key_id: "fxlab_jenkins"
interface: "public"
region: "us-east-1"
require_chef_omnibus: false
subnet_id: "subnet-cd28dca9"
iam_profile_name: "AmazonEC2ReadOnlyAccess"

transport:
name: "ssh"
ssh_key: "/id_rsa.pem"
username: "ec2-user"
connection_retries: 5
connection_retry_sleep: 30
max_wait_until_ready: 300
# BUG Related to https://github.com/test-kitchen/test-kitchen/pull/1047
max_ssh_sessions: 2

provisioner:
name: "ansible_playbook"
hosts: "all"
ansible_connection: "local"
ansible_verbose: false
ansible_verbosity: 2
require_pip: true
ansible_version: "2.7.10"
idempotency_test: true
require_chef_for_busser: false
require_ruby_for_busser: false
role_name: "ansible-role-docker"
roles_path: "."

platforms:
- name: "rhel-7"
driver:
instance_type: "t3.small"
tags:
Name: "tk-ansible-role-docker"
kitchen: "true"
packer: "true"
- name: "centos-7"
driver:
image_search:
name: "CentOS Linux 7*"
owner-id: "679593333241"
product-code: "aw0evgkw8e5c1q413zgy5pjce"
instance_type: "t3.small"
tags:
Name: "tk-ansible-role-docker"
kitchen: "true"
packer: "true"
transport:
username: "centos"
- name: "amazon2-2019"
driver:
instance_type: "t3.small"
tags:
Name: "tk-ansible-role-docker"
kitchen: "true"
packer: "true"

verifier:
name: inspec
sudo: true
reporter:
- cli
- junit:%{platform}_%{suite}_inspec.xml

suites:
- name: "rhel"
includes:
- "rhel-7"
provisioner:
name: "ansible_playbook"
playbook: "tests/test.yml"
verifier:
inspec_tests:
- name: local
path: test/integration/default/rhel.rb
- name: "centos"
includes:
- "centos-7"
provisioner:
name: "ansible_playbook"
playbook: "tests/test.yml"
verifier:
inspec_tests:
- name: local
path: test/integration/default/centos.rb
- name: "amazon"
includes:
- "amazon2-2019"
provisioner:
name: "ansible_playbook"
playbook: "tests/test.yml"
verifier:
inspec_tests:
- name: local
path: test/integration/default/amazon.rb


+ 68
- 0
meta/main.yml View File

@@ -0,0 +1,68 @@
galaxy_info:
author: FXInnovation Inc
description: Install docker for CentOS / RHEL / Amazon Linux 2.
company: FXInnovation Inc

# If the issue tracker for your role is not on github, uncomment the
# next line and provide a value
# issue_tracker_url: http://example.com/issue/tracker

# Some suggested licenses:
# - BSD (default)
# - MIT
# - GPLv2
# - GPLv3
# - Apache
# - CC-BY
license: MIT

min_ansible_version: 2.7

# If this a Container Enabled role, provide the minimum Ansible Container version.
# min_ansible_container_version:

# Optionally specify the branch Galaxy will use when accessing the GitHub
# repo for this role. During role install, if no tags are available,
# Galaxy will use this branch. During import Galaxy will access files on
# this branch. If Travis integration is configured, only notifications for this
# branch will be accepted. Otherwise, in all cases, the repo's default branch
# (usually master) will be used.
#github_branch:

#
# Provide a list of supported platforms, and for each platform a list of versions.
# If you don't wish to enumerate all versions for a particular platform, use 'all'.
# To view available platforms and versions (or releases), visit:
# https://galaxy.ansible.com/api/v1/platforms/
#
# platforms:
# - name: Fedora
# versions:
# - all
# - 25
# - name: SomePlatform
# versions:
# - all
# - 1.0
# - 7
# - 99.99
platforms:
- name: RedHat
versions:
- 7
- name: Amazon
- name: EL
versions:
- 7

galaxy_tags: []
# List tags for your role here, one per line. A tag is a keyword that describes
# and categorizes the role. Users find roles by searching for tags. Be sure to
# remove the '[]' above, if you add tags to this list.
#
# NOTE: A tag is limited to a single word comprised of alphanumeric characters.
# Maximum 20 tags per role.

dependencies: []
# List your role dependencies here, one per line. Be sure to remove the '[]' above,
# if you add dependencies to this list.

+ 7
- 0
tasks/docker-compose.yml View File

@@ -0,0 +1,7 @@
---

- name: "Install docker-compose"
get_url:
url: https://github.com/docker/compose/releases/download/{{ docker_compose_version }}/docker-compose-Linux-x86_64
dest: "{{ docker_compose_path }}"
mode: 0755

+ 7
- 0
tasks/docker-users.yml View File

@@ -0,0 +1,7 @@
---
- name: Ensure docker users are added to the docker group.
user:
name: "{{ item }}"
groups: docker
append: true
with_items: "{{ docker_users }}"

+ 27
- 0
tasks/main.yml View File

@@ -0,0 +1,27 @@
---
- include_tasks: setup-RedHat.yml
when:
- ansible_os_family == 'RedHat'
- ansible_distribution != "Amazon"

- include_tasks: setup-Amazon.yml
when:
- ansible_distribution == "Amazon"

- include_tasks: setup-Debian.yml
when: ansible_os_family == 'Debian'

- name: Ensure Docker is started and enabled at boot.
service:
name: docker
state: "{{ docker_service_state }}"
enabled: "{{ docker_service_enabled }}"

- name: Ensure handlers are notified now to avoid firewall conflicts.
meta: flush_handlers

- include_tasks: docker-compose.yml
when: docker_install_compose

- include_tasks: docker-users.yml
when: docker_users

+ 6
- 0
tasks/setup-Amazon.yml View File

@@ -0,0 +1,6 @@
---
- name: "Install Docker."
package:
name: "docker"
state: "present"
notify: "restart docker"

+ 34
- 0
tasks/setup-Debian.yml View File

@@ -0,0 +1,34 @@
---

- name: Ensure dependencies are installed.
apt:
name:
- apt-transport-https
- ca-certificates
state: present

- name: Copy Docker GPG key
copy:
src: docker_centos_gpg
dest: /tmp/docker_debian_gpg
owner: root
group: root

- name: Add Docker apt key.
apt_key:
url: /tmp/docker_debian_gpg
id: 9DC858229FC7DD38854AE2D88D81803C0EBFCD88
state: present
register: add_repository_key

- name: Add Docker repository.
apt_repository:
repo: "{{ docker_apt_repository }}"
state: present
update_cache: true

- name: Install Docker.
package:
name: "{{ docker_package }}"
state: "{{ docker_package_state }}"
notify: restart docker

+ 60
- 0
tasks/setup-RedHat.yml View File

@@ -0,0 +1,60 @@
---

- name: Copy Docker GPG key
copy:
src: docker_centos_gpg
dest: /tmp/docker_centos_gpg
owner: root
group: root

- name: Add Docker GPG key.
rpm_key:
key: /tmp/docker_centos_gpg
state: present

- name: Add Docker repository.
get_url:
url: "{{ docker_yum_repo_url }}"
dest: '/etc/yum.repos.d/docker-{{ docker_edition }}.repo'
owner: root
group: root
mode: 0644

- name: Configure Docker Edge repo.
ini_file:
dest: '/etc/yum.repos.d/docker-{{ docker_edition }}.repo'
section: 'docker-{{ docker_edition }}-edge'
option: enabled
value: '{{ docker_yum_repo_enable_edge }}'

- name: Configure Docker Test repo.
ini_file:
dest: '/etc/yum.repos.d/docker-{{ docker_edition }}.repo'
section: 'docker-{{ docker_edition }}-test'
option: enabled
value: '{{ docker_yum_repo_enable_test }}'

# To install docker-ce, we need container-selinux available from an extras repo.
# The repository name depends of the environment (AWS RHEL AMI has a specific naming).
- name: "Find extra repos"
shell: "set -o pipefail; yum repolist all | egrep -e '^rhui-REGION-rhel-server-extras' -e '^rhel-7-server-extras-rpms' | cut -d'/' -f1"
args:
warn: no
register: "redhat_extrarepo"
changed_when: False
when: ansible_distribution == "RedHat"

- name: Install Docker.
package:
name: "{{ docker_package }}"
state: "{{ docker_package_state }}"
notify: restart docker
when: ansible_distribution != "RedHat"

- name: Install Docker.
yum:
name: "{{ docker_package }}"
state: "{{ docker_package_state }}"
enablerepo: "{{ redhat_extrarepo.stdout }}"
notify: restart docker
when: ansible_distribution == "RedHat"

+ 7
- 0
test/integration/default/amazon.rb View File

@@ -0,0 +1,7 @@
control "ansible-role-docker - #{os.name} #{os.release} - 01" do
impact 1.0
title 'Ansible role docker'
describe package('docker') do
it { should be_installed }
end
end

+ 7
- 0
test/integration/default/centos.rb View File

@@ -0,0 +1,7 @@
control "ansible-role-docker - #{os.name} #{os.release} - 01" do
impact 1.0
title 'Ansible role docker'
describe package('docker-ce') do
it { should be_installed }
end
end

+ 7
- 0
test/integration/default/rhel.rb View File

@@ -0,0 +1,7 @@
control "ansible-role-docker - #{os.name} #{os.release} - 01" do
impact 1.0
title 'Ansible role docker'
describe package('docker-ce') do
it { should be_installed }
end
end

+ 5
- 0
tests/test.yml View File

@@ -0,0 +1,5 @@
---
- hosts: localhost
remote_user: root
roles:
- ansible-role-docker

+ 2
- 0
vars/main.yml View File

@@ -0,0 +1,2 @@
---
# vars file for ansible-role-docker

Loading…
Cancel
Save