ripclawffb.helix_core.helix_core_license module – Deploy or remove a Perforce Helix Core license

Note

This module is part of the ripclawffb.helix_core collection (version 1.3.0).

It is not included in ansible-core. To check whether it is installed, run ansible-galaxy collection list.

To install it, use: ansible-galaxy collection install ripclawffb.helix_core. You need further requirements to be able to use this module, see Requirements for details.

To use it in a playbook, specify: ripclawffb.helix_core.helix_core_license.

New in ripclawffb.helix_core 1.3.0

Synopsis

  • Deploys or updates the server license on a Perforce Helix Core server.

  • This module uses the p4 license command. It operates on the raw text of the license file.

  • To deploy or update a license, use state: present and provide the raw text of the license file to the license parameter.

  • This module supports check mode and diff mode.

Requirements

The below requirements are needed on the host that executes this module.

  • P4Python pip module is required

Parameters

Parameter

Comments

charset

aliases: p4charset

string

Character set used for translation of unicode files

Can also use ‘P4CHARSET’ environment variable

Default: "none"

license

string

The raw text of the Perforce license file.

Required if state=present.

password

aliases: p4passwd

string / required

The login password

Can also use ‘P4PASSWD’ environment variable

server

aliases: p4port

string / required

The hostname/ip and port of the server (perforce:1666)

Can also use ‘P4PORT’ environment variable

state

string

Determines if the license should be present or removed.

Note that removing a license may leave the server in an unlicensed state (limited to a few users/files).

Choices:

  • "present" ← (default)

  • "absent"

user

aliases: p4user

string / required

A user with access to perform this operation

Can also use ‘P4USER’ environment variable

See Also

See also

Helix Core License

Manage server license

P4Python Pip Module

Python module to interact with Helix Core

Examples

# Deploy a server license from a file
- name: Deploy server license
  ripclawffb.helix_core.helix_core_license:
    state: present
    license: "{{ lookup('file', '/path/to/license.txt') }}"
    server: '1666'
    user: superuser
    charset: auto
    password: ''

Return Values

Common return values are documented here, the following are the fields unique to this module:

Key

Description

action

string

The action performed.

Returned: always

Can only return:

  • "created"

  • "updated"

  • "deleted"

  • "unchanged"

Sample: "created"

changed

boolean

Whether any changes were made to the license.

Returned: always

Sample: true

diff

dictionary

A dictionary containing ‘before’ and ‘after’ state of the resource.

Returned: when diff mode is enabled

after

string

The state of the resource after the action.

Returned: success

before

string

The state of the resource before the action.

Returned: success

license_info

dictionary

The current license details.

Returned: always

Sample: {"Application": "Helix Core", "Clients": "100", "Customer": "Example Corp", "IPaddress": "10.0.0.5", "License": "...", "License-Expires": "1735689600", "Platform": "linux26x86", "Support-Expires": "1735689600", "Users": "100"}

Authors

  • Asif Shaikh (@ripclawffb)