Skip to content

Commit

Permalink
kostyli (#3)
Browse files Browse the repository at this point in the history
Signed-off-by: Dmitriy Safronov <zimniy@cyberbrain.pw>
  • Loading branch information
dmitriysafronov committed Feb 18, 2024
1 parent faf74f9 commit 4f39791
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
4 changes: 2 additions & 2 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@

- name: Create override file for dnsmasq systemd service
ansible.builtin.template:
src: dnsmasq.systemd-resolved.override.j2
dest: "/etc/systemd/system/dnsmasq.service.d/systemd-resolved.conf"
src: dnsmasq.ansible.override.j2
dest: "/etc/systemd/system/dnsmasq.service.d/ansible.conf"
mode: '0644'
owner: root
group: root
Expand Down
5 changes: 5 additions & 0 deletions templates/dnsmasq.ansible.override.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{{ ansible_managed | comment }}

[Service]
ExecStartPre=/usr/bin/sh -c 'systemctl is-active systemd-resolved.service > /dev/null && systemctl stop systemd-resolved.service'
ExecStartPost=/usr/bin/sh -c 'systemctl is-active systemd-resolved.service > /dev/null || ( systemctl is-enabled systemd-resolved.service > /dev/null && systemctl start systemd-resolved.service )'
4 changes: 0 additions & 4 deletions templates/dnsmasq.systemd-resolved.override.j2

This file was deleted.

0 comments on commit 4f39791

Please sign in to comment.