0
0
vps-set-up-playbook/roles/systemd-resolved/tasks/main.yaml

33 lines
775 B
YAML
Raw Normal View History

2023-11-14 00:06:09 +08:00
- name: Install systemd-resolved
apt:
name:
- systemd-resolved
state: latest
install_recommends: false
when: inventory_hostname in groups["oracle"]
- name: Create resolved.conf.d directory
ansible.builtin.file:
path: /etc/systemd/resolved.conf.d
state: directory
owner: 0
group: 0
mode: '0755'
when: inventory_hostname in groups["oracle"]
- name: Set up /etc/systemd/resolved.conf.d/oracle.conf
copy:
src: "oracle.conf"
dest: "/etc/systemd/resolved.conf.d/oracle.conf"
owner: 0
group: 0
mode: "0644"
when: inventory_hostname in groups["oracle"]
- name: Restart systemd-resolved
service:
name: systemd-resolved
enabled: true
state: restarted
when: inventory_hostname in groups["oracle"]