---
# Render the p4broker configs, install the proxy bypass filter, and enable and
# start the p4broker systemd service. Shared by the install path (install/broker.yml)
# and the standalone broker installer (install_broker.yml). The broker binary and
# SSL material are provided by the caller.
- name: "Render p4broker config"
ansible.builtin.template:
src: "./p4broker_1.cfg.j2"
dest: "/p4/common/config/p4_{{ perforce_id }}.broker.{{ perforce_master_id }}.cfg"
owner: "{{ perforce_user }}"
group: "{{ perforce_group }}"
mode: '0644'
- name: "Render p4broker maintenance config"
ansible.builtin.template:
src: "./p4broker_1.cfg.maintenance.j2"
dest: "/p4/common/config/p4_{{ perforce_id }}.broker.{{ perforce_master_id }}.cfg.maintenance"
owner: "{{ perforce_user }}"
group: "{{ perforce_group }}"
mode: '0644'
- name: "Install broker proxy bypass filter"
ansible.builtin.copy:
src: "./broker_proxy_filter.pl"
dest: "/p4/common/config"
mode: '0755'
owner: "{{ perforce_user }}"
group: "{{ perforce_group }}"
- name: "Install p4broker systemd unit"
ansible.builtin.copy:
src: "/{{ perforce_sdp_volume }}/sdp/Server/Unix/setup/systemd/p4broker_{{ perforce_id }}.service"
remote_src: true
dest: "/etc/systemd/system"
mode: '0755'
owner: "root"
group: "root"
- name: "Enable and start p4broker systemd service"
ansible.builtin.systemd:
name: "p4broker_{{ perforce_id }}"
enabled: true
daemon_reload: true
state: "started"
| # | Change | User | Description | Committed | |
|---|---|---|---|---|---|
| #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. |