- name: "stop perforce"
service:
name: "p4d_{{ perforce_id }}"
state: "stopped"
- name: "Remove existing sdp folder."
file:
path: "/{{ perforce_sdp_volume }}/sdp"
state: absent
when: new_sdp
- name: "Get sdp.tgz"
get_url:
url: "https://swarm.workshop.perforce.com/downloads/guest/russell_jackson/sdp.tgz"
dest: "/{{ perforce_sdp_volume }}/"
mode: '0700'
when: new_sdp
- name: "Untar sdp.tgz"
unarchive:
remote_src: yes
src: "/{{ perforce_sdp_volume }}/{{ perforce_sdp_file }}"
dest: "/{{ perforce_sdp_volume }}"
owner: "{{ perforce_user }}"
group: "{{ perforce_group }}"
mode: 0755
when: new_sdp
- name: "Remove old p4 binary"
file:
path: /p4/common/bin/p4
state: absent
- name: "Remove old p4d binary"
file:
path: /p4/common/bin/p4d
state: absent
- name: "Remove old p4broker binary"
file:
path: /p4/common/bin/p4broker
state: absent
- name: "Get p4 binary"
get_url:
url: "https://ftp.perforce.com/perforce/r{{ perforce_version }}/bin.linux26x86_64/p4"
dest: "/{{ perforce_common_volume }}/p4/common/bin"
owner: "{{ perforce_user }}"
group: "{{ perforce_group }}"
mode: '0700'
when: not new_sdp
- name: "Get p4d binary"
get_url:
url: "https://ftp.perforce.com/perforce/r{{ perforce_version }}/bin.linux26x86_64/p4d"
dest: "/{{ perforce_common_volume }}/p4/common/bin"
owner: "{{ perforce_user }}"
group: "{{ perforce_group }}"
mode: '0700'
when: not new_sdp
- name: "Get p4broker binary"
get_url:
url: "https://ftp.perforce.com/perforce/r{{ perforce_version }}/bin.linux26x86_64/p4broker"
dest: "/{{ perforce_common_volume }}/p4/common/bin"
owner: "{{ perforce_user }}"
group: "{{ perforce_group }}"
mode: '0700'
when: not new_sdp
- name: "Get p4 binary"
get_url:
url: "https://ftp.perforce.com/perforce/r{{ perforce_version }}/bin.linux26x86_64/p4"
dest: "/{{ perforce_sdp_volume }}/sdp/Server/Unix/p4/common/bin"
owner: "{{ perforce_user }}"
group: "{{ perforce_group }}"
mode: '0700'
when: new_sdp
- name: "Get p4d binary"
get_url:
url: "https://ftp.perforce.com/perforce/r{{ perforce_version }}/bin.linux26x86_64/p4d"
dest: "/{{ perforce_sdp_volume }}/sdp/Server/Unix/p4/common/bin"
owner: "{{ perforce_user }}"
group: "{{ perforce_group }}"
mode: '0700'
when: new_sdp
- name: "Get p4broker binary"
get_url:
url: "https://ftp.perforce.com/perforce/r{{ perforce_version }}/bin.linux26x86_64/p4broker"
dest: "/{{ perforce_sdp_volume }}/sdp/Server/Unix/p4/common/bin"
owner: "{{ perforce_user }}"
group: "{{ perforce_group }}"
mode: '0700'
when: new_sdp
- name: "mkdirs template"
template:
src: "./mkdirs.cfg.j2"
dest: "/{{ perforce_sdp_volume }}/sdp/Server/Unix/setup/mkdirs.cfg"
when: new_sdp
#- name: "Remove old p4 versions"
# shell: "rm -f p4*_*"
# ignore_errors: yes
# args:
# chdir: "/p4/common/bin"
# register: "perforce_mkdirs_output"
# when: new_sdp
- name: "run mkdirs install script"
shell: "./mkdirs.sh mkdirs.cfg"
args:
chdir: "/{{ perforce_sdp_volume }}/sdp/Server/Unix/setup"
register: "perforce_mkdirs_output"
when: new_sdp
- name: "Upgrade the database"
become: yes
become_user: "{{ perforce_user }}"
shell:
chdir: "/p4/common/bin"
cmd: "/p4/common/bin/upgrade.sh {{ perforce_id }}"
- name: "start perforce"
service:
name: "p4d_{{ 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. |