Ansible/node-configuration/tasks/misc.yml

23 lines
567 B
YAML
Raw Normal View History

2022-05-25 23:24:56 +00:00
---
- 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