cisagov / ansible-role-openvpn

Ansible role to install an OpenVPN server and configure it to authenticate users certificates against FreeIPA.
Creative Commons Zero v1.0 Universal
8 stars 2 forks source link

Handle Kali case explicitly and pull in upstream changes #15

Closed jsf9k closed 4 years ago

jsf9k commented 4 years ago

πŸ—£ 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 and ansible_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 a regex_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

felddy commented 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.

jsf9k commented 4 years ago

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.

jsf9k commented 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.

I rebuilt the Debian 11 + systemd image and it started passing. I still don't know what the story was.