5 Commits

Author SHA1 Message Date
Clark Boylan
5f3c90057c Fix check zone role for Jammy
Ubuntu Jammy installs the named-checkzone tool to
/usr/bin/named-checkzone, but old ubuntu installed to
/usr/sbin/named-checkzone. Rather than try and keep track of the
different locations we update the task to run under the shell module so
that we can rely on $PATH to do the heavy lifting for us.

To help ensure this doesn't break the old path and to catch problems
earlier I have also added testing across the debuntu set of platforms.
The role doesn't currently support other platforms as it relies on the
bind9utils package.

Change-Id: I1650b605cb6f25fa7585524b427d65d2fc291338
2022-11-02 14:26:07 -07:00
Ian Wienand
a016a1a565 linters: standardise on newline at end of file
I noticed this by accident when I ran ansible-lint over this repo from
an outside context; it didn't use the .yamllint in here and started
compalining about eof whitespace.

After scratching my head for a bit as to why this didn't fail here, I
realised we've allowed various newlines since the initial commit
I936fe2c997597972d884c5fc62655d28e8aaf8c5.

Remove this and just use the default eof rules, and fixup the
whitespace as required.  This is fairly unimportant, but is nice for
consistency.

Change-Id: Idb46a1f39ba798b0bf70eaa27b4c6b4758ce3d26
2022-07-28 16:19:06 +10:00
Clark Boylan
4ed66807a0 Use unique loop vars to avoid conflicts
We have to be careful about avoiding outer loop loop_var conflicts in
ansible. Because the zuul-jobs roles are meant to be reconsumed
elsewhere we should not use 'item' loopvars and instead set them to
something a bit more unique.

We use a zj_ prefix to try and be unique to this repo and document this
convention.

Change-Id: I20b9327a914890e9eafcb2b36dc8c23fb472bc8f
2020-02-04 12:23:36 -08:00
Ian Wienand
e6ca2e7c84 validate-zone-db : add job and make more generic
There was a request in If3dc95d1348553e5b43683f6a36d324fb978fbed to
make the role more generic so it could handle different layouts of
zone.db files.  Make it so the role can take a list of tuples (domain,
path/to/zone.db) so that we can handle any layouts, and modify the
default searching to build this from the source directory.

Reviews in https://review.opendev.org/660888 suggested making this
defined as a generic job, so a validate-zone-db job is added.

Change-Id: I56cbc027f63787f90eef283eeb2fbb81486dcaf5
2019-05-24 10:00:49 +10:00
Ian Wienand
42b9c209ab Zone file validation role
This role uses named-checkzone to validate Bind zone.db files it finds
in the specified directory.  Helps to avoid committing broken DNS
configurations.

Needed-By: https://review.opendev.org/660888

Change-Id: If3dc95d1348553e5b43683f6a36d324fb978fbed
2019-05-23 20:32:41 +10:00