---
# Host-level service and network tuning.
- name: "Exclude p4d and p4broker from automatic restart on package changes"
ansible.builtin.copy:
src: "./policy-rc.d"
dest: "/usr/sbin/policy-rc.d"
owner: "root"
group: "root"
# policy-rc.d must be executable to be honoured by invoke-rc.d.
mode: '0755'
# The bbr congestion control set below needs the tcp_bbr module. On Debian/Ubuntu
# kernels it is built-in or autoloads; on RedHat-family hosts load and persist it
# explicitly so "sysctl --system" can apply the setting without error.
- name: "Ensure /etc/modules-load.d exists (RedHat)"
ansible.builtin.file:
path: "/etc/modules-load.d"
state: directory
owner: "root"
group: "root"
mode: '0755'
when: ansible_facts["os_family"] == "RedHat"
- name: "Persist tcp_bbr module across reboots (RedHat)"
ansible.builtin.copy:
content: "tcp_bbr\n"
dest: "/etc/modules-load.d/tcp_bbr.conf"
owner: "root"
group: "root"
mode: '0644'
when: ansible_facts["os_family"] == "RedHat"
- name: "Load tcp_bbr module (RedHat)"
community.general.modprobe:
name: "tcp_bbr"
state: "present"
when: ansible_facts["os_family"] == "RedHat"
- name: "Add recommended network tuning to sysctl.d"
ansible.builtin.blockinfile:
path: "/etc/sysctl.d/99-perforce.conf"
create: true
insertafter: "EOF"
mode: '0644'
block: |
net.ipv4.tcp_congestion_control = bbr
net.ipv4.tcp_window_scaling = 1
# allow testing with buffers up to 128MB
net.core.rmem_max = 62500000
net.core.wmem_max = 62500000
# increase Linux autotuning TCP buffer limit to 64MB
net.ipv4.tcp_rmem = 4096 87380 62500000
net.ipv4.tcp_wmem = 4096 16384 62500000
# recommended for hosts with jumbo frames enabled
net.ipv4.tcp_mtu_probing = 1
# recommended to enable 'fair queueing'
net.core.default_qdisc = fq
notify: "Restart sysctl"
| # | Change | User | Description | Committed | |
|---|---|---|---|---|---|
| #2 | 32879 | Russell C. Jackson (Rusty) | Harness: tolerate optional/absent scripts + accept ccheck PASS (Grade A or B) | ||
| #1 | 32842 | Russell C. Jackson (Rusty) |
Reorganize ansible-sdp into per-concern task files; ansible-lint production-clean - Split install.yml/cron.yml/dependencies.yml and the monitoring role into thin orchestrators plus single-purpose phase files; extract shared steps into tasks/common/ (fetch_sdp, fetch_binaries, run_mkdirs, copy_ssl, configure_broker, sudoers). - Full best-practices pass: FQCN, true/false, quoted modes, changed_when, loops, document-start markers; fill both roles' meta; add .ansible-lint. - RedHat parity: parameterized EPEL enable, dnf, full upgrade, sysctl/bbr tuning. - Collapse the 12 journal-rotation cron tasks to one; consolidate duplicate download/broker logic; fix broken tests/test.yml role reference. - Validated ansible-lint clean at the production profile (ansible-core 2.21 / python 3.12) and ansible-playbook --syntax-check OK. |