Skip to content
This repository has been archived by the owner on Feb 7, 2023. It is now read-only.

Commit

Permalink
dsv: update role to be more consistent across all streams (#421)
Browse files Browse the repository at this point in the history
* 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
Micah Abbott authored and mike-nguyen committed Jun 28, 2018
1 parent 1243a8f commit f7978bf
Show file tree
Hide file tree
Showing 14 changed files with 11 additions and 44 deletions.
36 changes: 11 additions & 25 deletions roles/docker_storage_verify/tasks/main.yml
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
1 change: 0 additions & 1 deletion roles/docker_storage_verify/vars/centos-7.yml

This file was deleted.

1 change: 0 additions & 1 deletion roles/docker_storage_verify/vars/centos.yml

This file was deleted.

1 change: 0 additions & 1 deletion roles/docker_storage_verify/vars/centosdev-7.yml

This file was deleted.

3 changes: 0 additions & 3 deletions roles/docker_storage_verify/vars/devicemapper.yml

This file was deleted.

1 change: 0 additions & 1 deletion roles/docker_storage_verify/vars/fedora-26.yml

This file was deleted.

1 change: 0 additions & 1 deletion roles/docker_storage_verify/vars/fedora-27.yml

This file was deleted.

1 change: 0 additions & 1 deletion roles/docker_storage_verify/vars/fedora-28.yml

This file was deleted.

1 change: 0 additions & 1 deletion roles/docker_storage_verify/vars/fedora-29.yml

This file was deleted.

3 changes: 0 additions & 3 deletions roles/docker_storage_verify/vars/overlay2.yml

This file was deleted.

3 changes: 0 additions & 3 deletions roles/docker_storage_verify/vars/redhat-3.yml

This file was deleted.

1 change: 0 additions & 1 deletion roles/docker_storage_verify/vars/redhat-7.5.yml

This file was deleted.

1 change: 0 additions & 1 deletion roles/docker_storage_verify/vars/redhat-7.yml

This file was deleted.

1 change: 0 additions & 1 deletion roles/docker_storage_verify/vars/redhat.yml

This file was deleted.

0 comments on commit f7978bf

Please sign in to comment.