Closed jsf9k closed 4 years ago
This is new:
fatal: [debian11_systemd]: FAILED! => {"changed": false, "msg": "Could not import python modules: apt, apt_pkg. Please install python3-apt package."}
Doesn't look spurious, but I'll rerun those tests.
Yes. I was investigating this new thang when I was called away for familial duties.
On Mon, Apr 20, 2020 at 10:03 PM Mark Feldhousen notifications@github.com wrote:
This is new: fatal: [debian11_systemd]: FAILED! => {"changed": false, "msg": "Could not import python modules: apt, apt_pkg. Please install python3-apt package."} Doesn't look spurious, but I'll rerun those tests.
This is new:
fatal: [debian11_systemd]: FAILED! => {"changed": false, "msg": "Could not import python modules: apt, apt_pkg. Please install python3-apt package."}
Doesn't look spurious, but I'll rerun those tests.
I rebuilt the Debian 11 + systemd image and it started passing. I still don't know what the story was.
π£ Description
In this pull request I modify the code to handle the Kali case explicitly. I also pull in upstream changes from cisagov/skeleton-ansible-role.
π Motivation and Context
The
ansible_distribution
andansible_os_family
Ansible facts for Kali Linux contain forward slashes. The latter, in particular, are not allowed in Linux filenames. In previous code I had handled the Kali case by setting the default vars or tasks file to be the Debian one. @mcdonnnj took a different tack, where he filtered those facts through aregex_replace()
filter and thus handled the Kali case explicitly. This is a cleaner and more explicit way of doing things, and is therefore preferred.@mcdonnnj also pointed out to me that Kali Linux does not always use the Debian packages directly, but in some cases hosts their own versions of packages that may install other dependencies or differ in other ways. Therefore there is no guarantee that setting the default vars or tasks file to the Debian one and letting Kali "fall through" to Debian (a la a
switch
statement) will always be the correct thing to do.π§ͺ Testing
All pre-commit hooks and molecule tests pass.
π₯ Types of Changes
β Checklist