---
# Deploy the guardrail scripts to /p4/common/bin. The trigger and update_limits.py
# are templated so group/user names come from inventory; the helper is copied.
- name: "Deploy the templated keep_group_unset trigger"
ansible.builtin.template:
src: "keep_group_unset.py.j2"
dest: "/p4/common/bin/triggers/keep_group_unset.py"
owner: "{{ perforce_user }}"
group: "{{ perforce_group }}"
mode: '0700'
become: true
- name: "Deploy the templated update_limits.py membership updater"
ansible.builtin.template:
src: "update_limits.py.j2"
dest: "/p4/common/bin/update_limits.py"
owner: "{{ perforce_user }}"
group: "{{ perforce_group }}"
mode: '0700'
become: true
- name: "Deploy the group-limits helper"
ansible.builtin.copy:
src: "manage_p4group.py"
dest: "/p4/common/bin/manage_p4group.py"
owner: "{{ perforce_user }}"
group: "{{ perforce_group }}"
mode: '0700'
become: true
| # | Change | User | Description | Committed | |
|---|---|---|---|---|---|
| #1 | 32894 | Russell C. Jackson (Rusty) |
Add group resource guardrails to perforce-sdp-install; inventory cleanup Guardrails (gated on guardrails_enabled, commit server): - New group_limits phase (thin orchestrator + group_limits/ subdir: deploy_scripts, set_limits, populate) included from main.yml. Templates the SDP keep_group_unset.py trigger and update_limits.py from inventory so no group/user name is hardcoded; sets Max* on each managed group via the new idempotent files/manage_p4group.py helper; populates the limits group once (marker-guarded). No new cron -- the SDP's hourly master cron maintains membership. - Every group name is its own variable (p4_baseline_group, p4_integrators_group, p4_unlimited_group, p4_admins_group, p4_replicas_group); p4_group_limits is a list of {name, limits}. Naming convention in group_vars/main; per-environment values + enable flag in each commit server's host_vars; safe fallbacks in defaults. - Molecule: install scenario now runs the guardrails phase after configure_new_server and verifies the scripts are deployed and the limits/p4-unlimited groups carry the expected values. README + docs updated. Inventory cleanup: - Removed the 2kgla1tst2 and la1v-rjackson commit hosts (host_vars + inventory). - Renamed the top-level inventory group central -> main (group_vars dir moved, references updated across inventory, molecule, README, CLAUDE.md). ansible-lint production-clean; playbooks syntax-check; helper/templates compile. |