34 lines
980 B
YAML

- name: Set package lists for update
ansible.builtin.lineinfile:
path: /etc/apt/sources.list
line: "deb http://download.proxmox.com/debian/pve {{ ansible_distribution_release }} pve-no-subscription"
state: present
- name: Remove enterprise subscription
ansible.builtin.lineinfile:
path: /etc/apt/sources.list.d/pve-enterprise.list
line: "deb https://enterprise.proxmox.com/debian/pve {{ ansible_distribution_release }} pve-enterprise"
state: absent
- name: Set kernel watchdog to reboot on kernel panic
ansible.builtin.lineinfile:
path: /etc/sysctl.conf
line: kernel.panic = 10
state: present
create: yes
backup: yes
mode: 0644
- name: Apply sysctl.conf
ansible.builtin.shell: sysctl -p
when: ansible_os_family == 'Debian'
- name: Reboot host
reboot:
msg: "Reboot initiated by Ansible"
connect_timeout: 5
reboot_timeout: 600
pre_reboot_delay: 0
post_reboot_delay: 30
test_command: whoami