Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ansible remediation configure_bind_crypto_policy #12325

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# platform = multi_platform_all
# reboot = false
# strategy = configure
# complexity = low
# disruption = low

- name: "{{{ rule_title }}} - Check BIND configuration file exists"
ansible.builtin.stat:
path: /etc/named.conf
register: bind_config_file

- name: "{{{ rule_title }}} - Aborting remediation, file not found"
ansible.builtin.debug:
msg: "Aborting remediation as '/etc/named.conf' was not found."
when: not bind_config_file.stat.exists

- name: "{{{ rule_title }}} - Insert crypto-policy into BIND config"
ansible.builtin.lineinfile:
path: /etc/named.conf
insertafter: '^\s*options\s*{'
line: ' include "/etc/crypto-policies/back-ends/bind.config";'
state: present
when: bind_config_file.stat.exists
Loading