Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
ansible
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
infrastruktur
ansible
Commits
061f0ddf
Commit
061f0ddf
authored
1 month ago
by
Adrian Reyer
Browse files
Options
Downloads
Patches
Plain Diff
role_dns: add ACLs
parent
6b53a662
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
roles/dns/defaults/main.yml
+1
-0
1 addition, 0 deletions
roles/dns/defaults/main.yml
roles/dns/tasks/main.yml
+8
-0
8 additions, 0 deletions
roles/dns/tasks/main.yml
roles/dns/templates/named.conf.acl.j2
+9
-0
9 additions, 0 deletions
roles/dns/templates/named.conf.acl.j2
with
18 additions
and
0 deletions
roles/dns/defaults/main.yml
+
1
−
0
View file @
061f0ddf
...
...
@@ -4,3 +4,4 @@ dns_secondary_zonefile_dir: /var/lib/bind
dns_primary_zones
:
{}
dns_primary_zonefile_dir
:
/etc/bind/zones
dns_primary_ips
:
{}
dns_acls
:
{}
This diff is collapsed.
Click to expand it.
roles/dns/tasks/main.yml
+
8
−
0
View file @
061f0ddf
...
...
@@ -56,6 +56,13 @@
notify
:
-
reload bind
-
name
:
Create config file for ACLs
ansible.builtin.template
:
src
:
named.conf.acl.j2
dest
:
"
/etc/bind/named.conf.acl"
notify
:
-
reload bind
-
name
:
Ensure ansible managed config files are included
ansible.builtin.blockinfile
:
marker
:
"
//
{mark}
ANSIBLE
MANAGED"
...
...
@@ -63,6 +70,7 @@
block
:
|
// Include TSIG first
include "/etc/bind/named.conf.tsig";
include "/etc/bind/named.conf.acl";
include "/etc/bind/named.conf.primary";
include "/etc/bind/named.conf.secondary";
notify
:
...
...
This diff is collapsed.
Click to expand it.
roles/dns/templates/named.conf.acl.j2
0 → 100644
+
9
−
0
View file @
061f0ddf
// WARNING Ansible managed, changes will be overwritten!
{% for acl, aclline in dns_acls.items() %}
acl "{{ acl }}" {
{% for line in aclline | default([]) %}
{{ line }}
{% endfor %}
};
{% endfor %}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment