install_broker.yml #2

  • //
  • guest/
  • russell_jackson/
  • ansible-sdp/
  • roles/
  • perforce-sdp-install/
  • tasks/
  • install_broker.yml
  • View
  • Commits
  • Open Download .zip Download (2 KB)
- name: "Get p4broker binary"
  get_url:
    url: "https://ftp.perforce.com/perforce/r{{ perforce_broker_version }}/bin.linux26x86_64/p4broker"
    dest: "/{{ perforce_sdp_volume }}/sdp/Server/Unix/p4/common/bin"
    mode: '0700'

- name: "p4broker template"
  template:
    src: "./p4broker_1.cfg.j2"
    dest: "/p4/common/config/p4_{{ perforce_id }}.broker.{{ perforce_master_id }}.cfg"
    owner: "{{ perforce_user }}"
    group: "{{ perforce_group }}"

- name: "p4broker maintenance template"
  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 }}"

- name: "Copy broker proxy by pass script."
  copy:
    src: "./broker_proxy_filter.pl"
    dest: "/p4/common/config"
    mode: "0755"
    owner: "{{ perforce_user }}"
    group: "{{ perforce_group }}"

- name: "Copy certificate.txt to ssl directory"
  copy:
    src: "./certificate.txt"
    dest: "/p4/ssl"
    mode: "0600"
    owner: "{{ perforce_user }}"
    group: "{{ perforce_group }}"

- name: "Copy privatekey.txt to ssl directory"
  copy:
    src: "./privatekey.txt"
    dest: "/p4/ssl"
    mode: "0600"
    owner: "{{ perforce_user }}"
    group: "{{ perforce_group }}"

- name: "Setup p4broker systemd service file"
  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 p4broker systemd service"
  systemd:
    name: "p4broker_{{ perforce_id }}"
    enabled: true
    daemon_reload: true
    state: "started"

- name: "start p4broker service"
  service:
    name: "p4broker_{{ perforce_id }}"
    state: "started"
# Change User Description Committed
#2 32492 Russell C. Jackson (Rusty) Fix bugs, remove orphaned files, and apply best practices to ansible-sdp

- Fix broken Jinja2 filter syntax (|bool|) in main-playbook.yml
- Fix target_server logic comparing string literals instead of variables
- Fix package install failing on RedHat due to missing OS family guard
- Split packages into OS-agnostic and Debian-specific lists, remove duplicates
- Switch all binary downloads from HTTP to HTTPS
- Remove 7 orphaned files (unused templates, scripts, configs)
- Replace hardcoded emails in cron with template variables
- Fix inconsistent journal rotations (06:00/08:00) to use rotate_journal.sh
- Parameterize admin sudoers and perforce user password
- Fix ansible.cfg malformed vars block
- Fix ansibleuser sudo group for RedHat (wheel) vs Debian (sudo)
- Remove redundant triple broker start/restart in install.yml
- Replace shell sed with ansible.builtin.replace in monitoring role
- Fix duplicate handler and undefined variable in monitoring handlers
- Use notify handlers instead of inline commands for sysctl/THP
- Add idempotency (creates:) to pyenv install
#1 32488 Russell C. Jackson (Rusty) Ansible scaffolding for the sdp - Needs work.