This repository has been archived by the owner on Feb 7, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dsv: update role to be more consistent across all streams (#421)
* dsv: update role to be more consistent across all streams Almost all of the streams are using `overlay2` as the docker storage driver now, so we can remove a lot of the conditional workarounds we had. If we can get CAHC to switch to `overlay2` (see CentOS/sig-atomic-buildscripts#341), we can simplify this role even more. * fixup! dsv: update role to be more consistent across all streams
- Loading branch information
1 parent
1243a8f
commit f7978bf
Showing
14 changed files
with
11 additions
and
44 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,19 @@ | ||
--- | ||
# vim: set ft=ansible: | ||
# | ||
- name: Include distribution vars | ||
include_vars: "{{ item }}" | ||
with_first_found: | ||
- "{{ ansible_distribution|lower }}-{{ ansible_distribution_version }}.yml" | ||
- "{{ ansible_distribution|lower }}-{{ ansible_distribution_major_version }}.yml" | ||
- "{{ ansible_distribution|lower }}.yml" | ||
- name: Set storage driver | ||
set_fact: | ||
storage_driver: 'overlay2' | ||
|
||
- name: Fail if required variables are not defined | ||
when: driver is undefined | ||
fail: | ||
msg: "The required variables are not defined. Check files under roles/docker_storage_verify/vars" | ||
- name: Set storage driver for CAHC | ||
when: ansible_distribution == 'CentOSDev' | ||
set_fact: | ||
storage_driver: 'devicemapper' | ||
|
||
# When all the streams are on docker 1.13, we should start using | ||
# docker info --format '{{.Driver}}' | ||
- name: Check Docker storage driver | ||
shell: "docker info | grep -oP '(?<=Storage Driver: ).*'" | ||
register: storage_driver | ||
failed_when: storage_driver.stdout != driver | ||
command: "docker info --format {% raw %}{{.Driver}}{% endraw %}" | ||
register: di | ||
failed_when: "di.stdout != storage_driver" | ||
|
||
- name: Check for F26 Docker mount | ||
when: | ||
- ansible_distribution == 'Fedora' | ||
- ansible_distribution_major_version == '26' | ||
command: findmnt /var/lib/docker | ||
|
||
- name: Check for Fedora Rawhide Docker mount | ||
when: | ||
- ansible_distribution == 'Fedora' | ||
- ansible_distribution_major_version > '26' | ||
- name: Check for Docker mount | ||
command: findmnt /var/lib/docker/containers |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.