Default profile setter

Use this job to set the default profile in profiles.ini file.


Use it

Sample job configuration in your scenario file:

- name: Set default profile to conf_qgis_fr
    uses: default-profile-setter
    with:
      profile: conf_qgis_fr
      force_profile_selection_policy: 1

Options

profile

Name of the profile to set as default profile.

force_profile_selection_policy

Caution

This option’s behavior changed with version 0.40.0. Before it was just a boolean (see old version of this page). Make sure the new behavior is consistent with what you expect from this option.

Force the key selectionPolicy to the desired value in profiles.ini:

  • 0: Use last closed profile (default behavior). In out context, profile value may be overridden later by the user.

  • 1: Always open a specific profile. In our context, it will always open the default profile configured for this task.

  • 2: Choose at startup. In our context, the profile value will never be used.

See QGIS user profiles documentation for further details.


Schema

{
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "$id": "https://github.com/qgis-deployment/qgis-deployment-toolbelt-cli/raw/main/docs/schemas/scenario/jobs/default-profile-setter.json",
    "description": "Set the default profile in profile.ini",
    "title": "Default profile setter",
    "type": "object",
    "properties": {
        "profile": {
            "description": "Name of the profile to set as default profile.",
            "type": "string"
        },
        "force_profile_selection_policy": {
            "description": "Force the profile selection policy: 0: open last closed profile (default), 1: always use default profile, 2: always ask.",
            "type": "integer",
            "enum": [
                0,
                1,
                2
            ]
        }
    }
}