23 lines
567 B
YAML
23 lines
567 B
YAML
---
|
|
- name: Check if unattended-upgrades is installed
|
|
ansible.builtin.package_facts:
|
|
manager: "auto"
|
|
|
|
- name: Remove unattended-upgrades package
|
|
ansible.builtin.package:
|
|
name: unattended-upgrades
|
|
state: absent
|
|
when: "'unattended-upgrades' in ansible_facts.packages"
|
|
|
|
- name: Disable IPv6
|
|
ansible.posix.sysctl:
|
|
name: net.ipv6.conf.all.disable_ipv6
|
|
value: '1'
|
|
sysctl_file: /etc/sysctl.d/70-disable-ipv6.conf
|
|
reload: true
|
|
|
|
- name: Set node's hostname
|
|
ansible.builtin.hostname:
|
|
name: "{{ hostname }}"
|
|
when: hostname is defined
|