Refactor roles to support new variable schema
Add common-env and docker roles
This commit is contained in:
@@ -1,71 +0,0 @@
|
||||
---
|
||||
# The dracut patch is an issue uniquely bound to the fact that I'm using several
|
||||
# old-as-shit hardware RAID cards. Specifically the Dell PERC H200 and the Dell PERC
|
||||
# H310, both of which had their hardware drivers dropped in Cent8 (despite the drivers
|
||||
# being included in the upstream fedora kernel, but whatever). OS installation and the
|
||||
# process in this set of tasks is based off of this blog post:
|
||||
# https://www.centos.org/forums/viewtopic.php?t=71862#p302447
|
||||
#
|
||||
# TODO: Host the RPMs locally. The internet may never forget, but it's also never there
|
||||
# when you need it
|
||||
#
|
||||
# NOTE: These tasks only need to be run on Cent8
|
||||
#
|
||||
# NOTE: We assume- since this file literally has 'centos' in the name- that the
|
||||
# ansible_distribution check has already been done at import time
|
||||
#
|
||||
|
||||
- name: Determine dracut version
|
||||
shell:
|
||||
cmd: rpm -qa | grep dracut-[0-9]
|
||||
warn: false
|
||||
register: dracut_version_check
|
||||
|
||||
- name: Install patched version of dracut
|
||||
when: dracut_version_check.stdout != "dracut-049-13.git20190614.p1.el8_0.elrepo.x86_64"
|
||||
block:
|
||||
- name: Create temporary download directory
|
||||
file:
|
||||
path: /tmp/dracut-patch
|
||||
state: directory
|
||||
|
||||
- name: Download patched dracut tool RPMs
|
||||
get_url:
|
||||
url: "{{ item.source }}"
|
||||
dest: /tmp/dracut-patch/{{ item.dest }}
|
||||
loop:
|
||||
- source: http://elrepo.org/people/akemi/testing/el8/dracut/dracut-049-13.git20190614.p1.el8_0.elrepo.x86_64.rpm
|
||||
dest: dracut.rpm
|
||||
- source: http://elrepo.org/people/akemi/testing/el8/dracut/dracut-caps-049-13.git20190614.p1.el8_0.elrepo.x86_64.rpm
|
||||
dest: dracut-caps.rpm
|
||||
- source: http://elrepo.org/people/akemi/testing/el8/dracut/dracut-config-generic-049-13.git20190614.p1.el8_0.elrepo.x86_64.rpm
|
||||
dest: dracut-config-generic.rpm
|
||||
- source: http://elrepo.org/people/akemi/testing/el8/dracut/dracut-config-rescue-049-13.git20190614.p1.el8_0.elrepo.x86_64.rpm
|
||||
dest: dracut-config-rescue.rpm
|
||||
- source: http://elrepo.org/people/akemi/testing/el8/dracut/dracut-live-049-13.git20190614.p1.el8_0.elrepo.x86_64.rpm
|
||||
dest: dracut-live.rpm
|
||||
- source: http://elrepo.org/people/akemi/testing/el8/dracut/dracut-network-049-13.git20190614.p1.el8_0.elrepo.x86_64.rpm
|
||||
dest: dracut-network.rpm
|
||||
- source: http://elrepo.org/people/akemi/testing/el8/dracut/dracut-squash-049-13.git20190614.p1.el8_0.elrepo.x86_64.rpm
|
||||
dest: dracut-squash.rpm
|
||||
- source: http://elrepo.org/people/akemi/testing/el8/dracut/dracut-tools-049-13.git20190614.p1.el8_0.elrepo.x86_64.rpm
|
||||
dest: dracut-tools.rpm
|
||||
|
||||
- name: Install patched dracut toolchain
|
||||
become: true
|
||||
dnf:
|
||||
state: latest
|
||||
name:
|
||||
- /tmp/dracut-patch/dracut.rpm
|
||||
- /tmp/dracut-patch/dracut-caps.rpm
|
||||
- /tmp/dracut-patch/dracut-config-generic.rpm
|
||||
- /tmp/dracut-patch/dracut-config-rescue.rpm
|
||||
- /tmp/dracut-patch/dracut-live.rpm
|
||||
- /tmp/dracut-patch/dracut-network.rpm
|
||||
- /tmp/dracut-patch/dracut-squash.rpm
|
||||
- /tmp/dracut-patch/dracut-tools.rpm
|
||||
|
||||
- name: Remove temporary download directory
|
||||
file:
|
||||
path: /tmp/dracut-patch
|
||||
state: absent
|
@@ -2,13 +2,13 @@
|
||||
- name: Clean DNF cache
|
||||
become: true
|
||||
when: ansible_distribution == "Fedora" or (ansible_distribution == "CentOS" and ansible_distribution_major_version == "8")
|
||||
shell:
|
||||
cmd: dnf clean all
|
||||
command:
|
||||
cmd: /usr/bin/dnf clean all
|
||||
warn: false
|
||||
|
||||
- name: Clean YUM cache
|
||||
become: true
|
||||
when: ansible_distribution == "CentOS" and ansible_distribution_major_version == "7"
|
||||
shell:
|
||||
cmd: yum clean all
|
||||
command:
|
||||
cmd: /usr/bin/yum clean all
|
||||
warn: false
|
||||
|
@@ -8,6 +8,14 @@
|
||||
state: latest
|
||||
name: https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
|
||||
|
||||
- name: Enable EPEL-Testing repository on CentOS 8s
|
||||
lineinfile:
|
||||
path: /etc/yum.repos.d/epel-testing.repo
|
||||
regexp: "enabled=(0|1)"
|
||||
line: "enabled=1"
|
||||
insertbefore: "^$"
|
||||
firstmatch: true
|
||||
|
||||
- name: Enable the power tools repository on CentOS 8
|
||||
lineinfile:
|
||||
path: /etc/yum.repos.d/CentOS-PowerTools.repo
|
||||
|
@@ -1,7 +1,4 @@
|
||||
---
|
||||
- import_tasks: centos-8-dracut.yml
|
||||
when: ansible_distribution == "CentOS" and ansible_distribution_major_version == "8"
|
||||
|
||||
# Gotta hate this, but I have to hardcode the systemd exclusion on cent8
|
||||
# Because I'm using "janky-systemd-networkd-2-the-jankening" (see the networkd role)
|
||||
# there are a pile of conflicts when you run "dnf update" with it installed. I found
|
||||
|
Reference in New Issue
Block a user