-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
116 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,28 @@ | ||
--- | ||
- name: Set docker-ce package state to latest | ||
- name: Set version string | ||
set_fact: | ||
_docker_version_string: "{{ docker_os_pkg_version_separator[_docker_os_dist] }}{{ docker_version }}" | ||
when: docker_version != '' | ||
|
||
- name: Set packages state to latest | ||
set_fact: | ||
_docker_pkg_state: 'latest' | ||
when: docker_latest_version | bool | ||
|
||
- name: Ensure docker-ce is installed | ||
- name: Filter out packages to match older Docker CE versions | ||
set_fact: | ||
_docker_packages: | ||
- docker-ce | ||
when: | ||
- docker_version != '' | ||
- docker_version | match('17.') or docker_version | match('18.03') or docker_version | match('18.06') | ||
|
||
- name: Ensure Docker CE is installed | ||
become: true | ||
package: | ||
name: "{{ docker_pkg_name }}" | ||
name: "{{ (item | search('docker')) | ternary((item + _docker_version_string | default('')), item) }}" | ||
state: "{{ _docker_pkg_state | default('present') }}" | ||
with_items: "{{ _docker_packages | default(docker_packages) }}" | ||
register: _pkg_result | ||
until: _pkg_result|succeeded | ||
notify: restart docker |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -68,4 +68,3 @@ if [[ "$arg_1" == "--nop" ]]; then | |
else | ||
GenerateTestCaseConfig $arg_1 $arg_2 | ||
fi | ||
echo "==> Done!" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,20 @@ | ||
--- | ||
- hosts: test-host | ||
vars: | ||
docker_pkg_name: docker-ce-17.06.0.ce-1.el7.centos | ||
roles: | ||
- haxorof.docker-ce | ||
tasks: | ||
- name: Install Docker CE 17.06 (using docker_pkg_name) | ||
include_role: | ||
name: haxorof.docker-ce | ||
vars: | ||
docker_pkg_name: docker-ce-17.06.0.ce-1.el7.centos | ||
|
||
- name: Remove Docker CE | ||
include_role: | ||
name: haxorof.docker-ce | ||
vars: | ||
docker_remove: true | ||
|
||
- name: Install Docker CE 18.06 (using docker_version) | ||
include_role: | ||
name: haxorof.docker-ce | ||
vars: | ||
docker_version: 18.06.1.ce-3.el7 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters