41 lines
1.1 KiB
YAML
41 lines
1.1 KiB
YAML
---
|
|
##############################################################################
|
|
# debian / ubuntu
|
|
|
|
- name: sysstat enable
|
|
tags: sysstat
|
|
lineinfile:
|
|
dest: /etc/default/sysstat
|
|
regexp: "^ENABLED="
|
|
line: 'ENABLED="true"'
|
|
|
|
- name: sysstat every minute
|
|
tags: sysstat
|
|
patch:
|
|
src: sysstat_minutely.patch
|
|
dest: /etc/cron.d/sysstat
|
|
|
|
- name: set sysctl conf file name
|
|
set_fact:
|
|
sysctlconf: /etc/sysctl.conf
|
|
- name: set sysctl conf file name for Debian 13-99
|
|
set_fact:
|
|
sysctlconf: /etc/sysctl.d/disable_ipv6.conf
|
|
when: (ansible_distribution == "Debian" and ansible_distribution_major_version|int() >= 13)
|
|
|
|
- name: disable IPv6 in sysctl.conf
|
|
lineinfile:
|
|
dest: "{{ sysctlconf }}"
|
|
state: present
|
|
create: yes
|
|
regexp: "^{{ item.a }}"
|
|
line: "{{ item.a }} = {{ item.v }}"
|
|
with_items:
|
|
- { a: "net.ipv6.conf.all.disable_ipv6", v: 1 }
|
|
- { a: "net.ipv6.conf.default.disable_ipv6", v: 1 }
|
|
- { a: "net.ipv6.conf.lo.disable_ipv6", v: 1 }
|
|
when: "'ipv6' not in group_names"
|
|
|
|
|
|
# vim: set tabstop=2 shiftwidth=2 expandtab smarttab:
|