--- # Full-integration Molecule scenario for the perforce-sdp-monitoring role. # # The monitoring role queries a live p4d (case handling) and installs # p4prometheus, so prepare.yml stands up a real (unlicensed) commit-server with # the perforce-sdp-install role + configure_new_server.sh first, then converge # applies the monitoring role on top. # # Requires Docker with systemd-capable images (geerlingguy *-ansible). Both the # install and monitoring roles must be on the roles path (they are, since this # scenario lives under roles/perforce-sdp-monitoring and ../ resolves siblings). dependency: name: galaxy driver: name: docker platforms: - name: mon-ubuntu2204 image: geerlingguy/docker-ubuntu2204-ansible:latest command: ${MOLECULE_DOCKER_COMMAND:-""} privileged: true cgroupns_mode: host volumes: - /sys/fs/cgroup:/sys/fs/cgroup:rw pre_build_image: true - name: mon-rocky9 image: geerlingguy/docker-rockylinux9-ansible:latest command: ${MOLECULE_DOCKER_COMMAND:-""} privileged: true cgroupns_mode: host volumes: - /sys/fs/cgroup:/sys/fs/cgroup:rw pre_build_image: true provisioner: name: ansible # prepare.yml applies the sibling perforce-sdp-install role, so put the # roles/ directory (this role's parent) on the roles path. env: ANSIBLE_ROLES_PATH: "${MOLECULE_PROJECT_DIRECTORY}/.." config_options: defaults: gathering: smart stdout_callback: yaml inventory: group_vars: all: # --- install-role vars (used by prepare.yml to bring up p4d) --- perforce_clean: false update_dependencies: true new_sdp: true new_p4d: false p4d_enabled: true install_broker: false copy_license: false dummy_interface: false perforce_depots_use_nfs: false manage_etc_hosts: true perforce_id: "1" perforce_server_type: "p4d_master" perforce_master_id: "master" perforce_replica_id: "standby" p4serviceuser: "svc_master" perforce_dnsname: "{{ inventory_hostname }}" perforce_standby_dnsname: "{{ inventory_hostname }}-standby" commit_dns: "{{ inventory_hostname }}" target_server: "{{ commit_dns }}" perforce_case_sensitive: "0" perforce_service: "p4d_{{ perforce_id }}" perforce_ssl_prefix: "" perforce_p4_port: "1666" perforce_p4broker_port: "ssl:1667" perforce_p4broker_target_port: "1666" perforce_user: "perforce" perforce_uid: "10666" perforce_group: "perforce" perforce_gid: "10666" perforce_version: "25.2" perforce_broker_version: "25.2" perforce_data_volume: "hxdepots" perforce_common_volume: "hxdepots" perforce_log_volume: "hxlogs" perforce_online_metadata_volume: "hxmetadata" perforce_offline_metadata_volume: "hxmetadata" perforce_domain: "molecule.test" perforce_mailfrom_email: "perforce-admin@{{ perforce_domain }}" perforce_mailto_email: "perforce-admin@{{ perforce_domain }}" perforce_smtp_server: "smtp.{{ perforce_domain }}" perforce_admin_user: "p4admin" perforce_admin_user_pass: "F@stSCM!" perforce_user_password: "$6$PerforceRules$DahgNsXI/V89vqPAXzwflxe7wU09fotIVI5waJACxVd01.EQpQqd5zdnbtgaV.ylstYfQq30xGEBC7yznkE6X1" admin_users: [] # --- monitoring-role vars --- p4prometheus_metrics_dir: "/p4/metrics" p4_network_latency_enabled: true verifier: name: ansible scenario: # The monitoring role is idempotent (the p4prometheus installer is guarded by # creates), so the idempotence step re-runs converge and asserts zero changes. # The p4d bring-up happens in prepare, which is not part of the idempotence run. test_sequence: - dependency - destroy - syntax - create - prepare - converge - idempotence - verify - destroy