replica.yml #1

  • //
  • guest/
  • russell_jackson/
  • ansible-sdp/
  • roles/
  • perforce-sdp-install/
  • tasks/
  • cron/
  • replica.yml
  • View
  • Commits
  • Open Download .zip Download (1 KB)
---
# Cron jobs for replica, standby, and edge-replica servers.
- name: "Sync replica"
  ansible.builtin.cron:
    name: "Sync replica"
    minute: "0"
    hour: "12"
    job: "/p4/common/bin/run_if_replica.sh ${INSTANCE} /p4/common/bin/sync_replica.sh ${INSTANCE}"

- name: "Recreate DB sync replica"
  ansible.builtin.cron:
    name: "Recreate DB Sync replica"
    minute: "5"
    hour: "22"
    weekday: "6"
    job: "[ $(date +\\%d) -le 07 ] && /p4/common/bin/run_if_replica.sh ${INSTANCE} /p4/common/bin/recreate_db_sync_replica.sh ${INSTANCE}"

- name: "Replica status"
  ansible.builtin.cron:
    name: "Replica Status"
    minute: "*/6"
    job: "/p4/common/bin/run_if_replica.sh ${INSTANCE} /p4/common/bin/replica_status.sh ${INSTANCE} > /dev/null"

# Replicas do not rotate structured logs (Perforce bug), so clear them here.
- name: "Clear structured logs"
  ansible.builtin.cron:
    name: "Clear structured logs"
    minute: "0"
    hour: "1"
    job: "/p4/common/bin/run_if_replica.sh ${INSTANCE} rm -f /p4/${INSTANCE}/logs/*.csv > /dev/null"
# 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.