freedomofpress / ansible-role-grsecurity

The documentation and build system for the grsecurity kernel maintained by the Freedom of the Press Foundation for SecureDrop
GNU General Public License v2.0
49 stars 13 forks source link

Ansible v2 compatibility #42

Closed ageis closed 8 years ago

ageis commented 8 years ago

@conorsch R

conorsch commented 8 years ago

@ageis Hey, this is great. I have some complementary changes locally, I'll rebase on top of yours.

conorsch commented 8 years ago

Two updates:

conorsch commented 8 years ago

We may have to check ansible_version on tasks using the regex_replace filter and escape the backreferences accordingly. From the docs:

Prior to ansible 2.0, if “regex_replace” filter was used with variables inside YAML arguments (as opposed to simpler ‘key=value’ arguments), then you needed to escape backreferences (e.g. \1) with 4 backslashes (\) instead of 2 ().

Will need to do further testing, but I'm pretty sure we have to only one of the escaping styles. If we want to support v1.9, we can use a version check. After more testing to confirm the behavior I'll open a separate issue if it's a problem.