--- # Converge: run the install role (full fresh SDP install -> p4d up), then # configure the new commit-server so it is ready for the functional harness. - name: Converge hosts: all become: true roles: - role: perforce-sdp-install post_tasks: # The install role brings p4d up but does not configure the server (super # user, server.id=master, depots, protections, configurables). The SDP test # harness needs a configured, logged-in commit-server, so run it here. Gate # it on a marker so the molecule idempotence run does not re-run it. - name: "Configure the new commit-server (once)" become: true become_user: "{{ perforce_user }}" ansible.builtin.shell: >- /p4/sdp/Server/Unix/setup/configure_new_server.sh {{ perforce_id }} && touch /p4/.molecule_configured args: chdir: "/p4/sdp/Server/Unix/setup" creates: "/p4/.molecule_configured" register: configure_result - name: "Show configure_new_server.sh output" ansible.builtin.debug: var: configure_result.stdout_lines when: not (configure_result.skipped | default(false)) # Exercise the group resource guardrails against the now-configured server # (the role gates this phase on guardrails_enabled; the server is only # configured here in post_tasks, so run the phase directly). Idempotent, so # the molecule idempotence step re-runs it cleanly. - name: "Configure group resource guardrails" ansible.builtin.import_role: name: perforce-sdp-install tasks_from: group_limits