[2.8] [cloud_init_data_facts tests] fix for centos8 (#72886) (#72888)

Change:
- `udev` is provided by `systemd-udev`, which our `state=present` check
  doesn't match. For now, work around this so we don't end up trying to
  upgrade all of systemd.
- In the future, we should discuss if the `yum` module does the right
  thing here.

Test Plan:
- Locally in docker
- CI

Signed-off-by: Rick Elrod <rick@elrod.me>
(cherry picked from commit 8eaa7423d4)
pull/72955/head
Rick Elrod 5 years ago committed by GitHub
parent 35409b732d
commit 41f1209186
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -11,11 +11,23 @@
- not (ansible_distribution == "Ubuntu" and ansible_distribution_major_version|int == 14)
- not (ansible_os_family == "Suse" and ansible_distribution_major_version|int != 42 and ansible_python.version.major != 3)
block:
- name: Include distribution specific variables
include_vars: "{{ lookup('first_found', params) }}"
vars:
params:
files:
- "{{ ansible_facts.distribution }}-{{ ansible_facts.distribution_major_version }}.yml"
- "{{ ansible_facts.os_family }}.yml"
- default.yml
paths:
- "{{ role_path }}/vars"
- debug:
var: pkgs_required
- name: setup install cloud-init
package:
name:
- cloud-init
- udev
name: "{{ pkgs_required }}"
- name: setup run cloud-init
service:

@ -0,0 +1,3 @@
pkgs_required:
- cloud-init
- systemd # This provides 'udev' as a virtual pkg

@ -0,0 +1,3 @@
pkgs_required:
- cloud-init
- systemd-udev
Loading…
Cancel
Save