-
Notifications
You must be signed in to change notification settings - Fork 107
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
DNM Check binding dnsmasq listen-address to 0.0.0.0 #2454
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -108,16 +108,32 @@ | |
validate: "{{ _validate }}" | ||
|
||
# Note(Lewis): Only needed for CRC => 2.32.0-4.14.8 | ||
- name: Wipe listen-address parameters from config to avoid duplication | ||
when: | ||
- not _dnsmasq.stat.exists | ||
become: true | ||
ansible.builtin.lineinfile: | ||
path: "{{ _dnsmasq_config }}" | ||
regexp: '^listen-address' | ||
state: absent | ||
|
||
- name: Configure dnsmasq listen-address to listen on both br-ex and ci-private-network | ||
when: | ||
- not _dnsmasq.stat.exists | ||
become: true | ||
ansible.builtin.lineinfile: | ||
path: "{{ _dnsmasq_config }}" | ||
insertafter: '^listen-address=' | ||
line: "listen-address={{ _crc_default_net_ip | ansible.utils.ipaddr('address') }}" | ||
insertbefore: '^expand-hosts' | ||
line: | | ||
listen-address=0.0.0.0 | ||
listen-address=:: | ||
validate: "{{ _validate }}" | ||
|
||
- name: Print current config | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please remove this after your testing. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. of course ;) |
||
become: true | ||
ansible.builtin.command: | | ||
cat {{ _dnsmasq_config }} | ||
|
||
rescue: | ||
- name: Debug _dnsmasq_config | ||
ansible.builtin.debug: | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -60,8 +60,7 @@ | |
vars: | ||
data: | ||
listen_addresses: | ||
- "127.0.0.1" | ||
- "{{ ansible_default_ipv4.address }}" | ||
- "0.0.0.0" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please drop this file from this PR |
||
ansible.builtin.set_fact: | ||
_dnsmaq_config: >- | ||
{{ | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# This file is generated by ci-framework tool | ||
listen-address={{ config.listen_addresses | join(',') }} | ||
listen-address=0.0.0.0 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please drop this file from this PR |
||
|
||
{% if 'interfaces' in config %} | ||
{% for interface in config.interfaces %} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -197,7 +197,8 @@ | |
cifmw_dnsmasq_network_name: "{{ item.name }}" | ||
cifmw_dnsmasq_network_state: present | ||
cifmw_dnsmasq_network_definition: "{{ item }}" | ||
cifmw_dnsmasq_network_listen_addresses: "{{ _dns_address[item.name] }}" | ||
cifmw_dnsmasq_network_listen_addresses: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please drop this file from this PR |
||
- "0.0.0.0" | ||
ansible.builtin.include_role: | ||
name: dnsmasq | ||
tasks_from: manage_network.yml | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason it needs to be before expand-hosts? if not, please just add it to EOF like line 95