Skip to content
Open
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions bibigrid/models/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ class MasterConfig(BaseConfig):
Holds info regarding the configuration
"""
masterInstance: Instance
dns_server_list: Optional[List[str]] = Field(default_factory=list)
sshPublicKeyFiles: Optional[List[str]] = Field(default_factory=list)
sshPublicKeys: Optional[List[str]] = Field(default_factory=list)
sshTimeout: Optional[int] = 5
Expand Down
5 changes: 5 additions & 0 deletions bibigrid/resources/playbook/roles/bibigrid/tasks/003-dns.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@
mode: "0o644"
notify: Dnsmasq

- name: Read upstream DNS IPs from systemd-resolved

Check failure on line 24 in bibigrid/resources/playbook/roles/bibigrid/tasks/003-dns.yaml

View workflow job for this annotation

GitHub Actions / linting-job

var-naming[no-role-prefix]

Variables names from within roles should use bibigrid_ as a prefix. (register: systemd_resolv_lines)
ansible.builtin.shell: "awk '/^nameserver/ {print $2}' /run/systemd/resolve/resolv.conf || true"
register: systemd_resolv_lines
changed_when: false

- name: Adjust dnsmasq.resolv.conf
template:
src: dns/resolv.conf.j2
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{% for ip in dns_server_list %}
{% for ip in dns_server_list + systemd_resolv_lines.stdout_lines %}
nameserver {{ ip }}
{% endfor %}
Loading