Browse Source

Merge pull request 'workaround RHEL' (#4) from workaround/rhel into master

Reviewed-by: Julien Cabillot <julien.cabillot@fxinnovation.com>
Reviewed-by: quentin.vallin <quentin.vallin@fxinnovation.com>
tags/0.0.4
morgan.wahbi 3 months ago
parent
commit
d178b9201c
5 changed files with 80 additions and 6 deletions
  1. +5
    -0
      CHANGELOG.md
  2. +1
    -0
      defaults/main.yml
  3. +62
    -0
      files/docker-ce.repo
  4. +2
    -0
      kitchen.yml
  5. +10
    -6
      tasks/setup-RedHat.yml

+ 5
- 0
CHANGELOG.md View File

@@ -1,5 +1,10 @@
# CHANGELOG

## 0.0.4

* Fix: docker repo bugged for rhel:
* added extra_vars in kitchen.yml to enable workaround

## 0.0.3

* fix: RHEL 7.8, match new repo name


+ 1
- 0
defaults/main.yml View File

@@ -20,3 +20,4 @@ docker_yum_repo_enable_edge: 0
docker_yum_repo_enable_test: 0

docker_users: []
rhel_docker_repo_workaround: false

+ 62
- 0
files/docker-ce.repo View File

@@ -0,0 +1,62 @@
[docker-ce-stable]
name=Docker CE Stable - $basearch
baseurl=https://download.docker.com/linux/centos/7/$basearch/stable
enabled=1
gpgcheck=1
gpgkey=https://download.docker.com/linux/centos/gpg

[docker-ce-stable-debuginfo]
name=Docker CE Stable - Debuginfo $basearch
baseurl=https://download.docker.com/linux/centos/$releasever/debug-$basearch/stable
enabled=0
gpgcheck=1
gpgkey=https://download.docker.com/linux/centos/gpg

[docker-ce-stable-source]
name=Docker CE Stable - Sources
baseurl=https://download.docker.com/linux/centos/$releasever/source/stable
enabled=0
gpgcheck=1
gpgkey=https://download.docker.com/linux/centos/gpg

[docker-ce-test]
name=Docker CE Test - $basearch
baseurl=https://download.docker.com/linux/centos/7/$basearch/test
enabled=0
gpgcheck=1
gpgkey=https://download.docker.com/linux/centos/gpg

[docker-ce-test-debuginfo]
name=Docker CE Test - Debuginfo $basearch
baseurl=https://download.docker.com/linux/centos/$releasever/debug-$basearch/test
enabled=0
gpgcheck=1
gpgkey=https://download.docker.com/linux/centos/gpg

[docker-ce-test-source]
name=Docker CE Test - Sources
baseurl=https://download.docker.com/linux/centos/$releasever/source/test
enabled=0
gpgcheck=1
gpgkey=https://download.docker.com/linux/centos/gpg

[docker-ce-nightly]
name=Docker CE Nightly - $basearch
baseurl=https://download.docker.com/linux/centos/$releasever/$basearch/nightly
enabled=0
gpgcheck=1
gpgkey=https://download.docker.com/linux/centos/gpg

[docker-ce-nightly-debuginfo]
name=Docker CE Nightly - Debuginfo $basearch
baseurl=https://download.docker.com/linux/centos/$releasever/debug-$basearch/nightly
enabled=0
gpgcheck=1
gpgkey=https://download.docker.com/linux/centos/gpg

[docker-ce-nightly-source]
name=Docker CE Nightly - Sources
baseurl=https://download.docker.com/linux/centos/$releasever/source/nightly
enabled=0
gpgcheck=1
gpgkey=https://download.docker.com/linux/centos/gpg

+ 2
- 0
kitchen.yml View File

@@ -77,6 +77,8 @@ suites:
provisioner:
name: "ansible_playbook"
playbook: "tests/test.yml"
extra_vars:
rhel_docker_repo_workaround: true
verifier:
inspec_tests:
- name: local


+ 10
- 6
tasks/setup-RedHat.yml View File

@@ -19,13 +19,16 @@
owner: root
group: root
mode: 0644
when: not rhel_docker_repo_workaround

- 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: 'replace repo file'
copy:
src: docker-ce.repo
dest: '/etc/yum.repos.d/docker-{{ docker_edition }}.repo'
owner: root
group: root
mode: 0644
when: rhel_docker_repo_workaround

- name: 'Configure Docker Test repo'
ini_file:
@@ -33,6 +36,7 @@
section: 'docker-{{ docker_edition }}-test'
option: 'enabled'
value: '{{ docker_yum_repo_enable_test }}'
when: not rhel_docker_repo_workaround

# 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).


Loading…
Cancel
Save