ripclawffb.helix_core.helix_core_group module – Manage groups on Perforce Helix Core

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_group.

New in ripclawffb.helix_core 1.0.0

Synopsis

  • Add or delete users from a group, or set the maxresults, maxscanrows, maxlocktime, and timeout limits for the members of a group

  • This module supports check 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"

ldapconfig

string

The LDAP configuration to use when populating the group’s user list from an LDAP query

ldapsearchquery

string

The LDAP query used to identify the members of the group

ldapuserattribute

string

The LDAP attribute that represents the user’s username

maxlocktime

string

The maximum length of time (in milliseconds) that any one operation can lock any database table when scanning data

Default: "unset"

maxopenfiles

string

The maximum number of files that a member of a group can open using a single command

Default: "unset"

maxresults

string

The maximum number of results that members of this group can access from the service from a single command

Default: "unset"

maxscanrows

string

The maximum number of rows that members of this group can scan from the service from a single command

Default: "unset"

name

aliases: group

string / required

The name of the group that needs to be managed

owners

list / elements=string

Names of other Helix server users

password

aliases: p4passwd

string / required

The login password

Can also use ‘P4PASSWD’ environment variable

passwordtimeout

string

The length of time (in seconds) for which passwords for users in this group remain valid

Default: "unset"

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 group is present or deleted

Choices:

  • "present" ← (default)

  • "absent"

subgroups

list / elements=string

Names of other Helix server groups

timeout

string

The duration (in seconds) of the validity of a session ticket created by p4 login

Default: "43200"

user

aliases: p4user

string / required

A user with access to perform this operation

Can also use ‘P4USER’ environment variable

users

list / elements=string

The Helix server usernames of the group members

See Also

See also

Helix Core Group

Add or delete users from a group, or set the maxresults, maxscanrows, maxlocktime, and timeout limits for the members of a group

P4Python Pip Module

Python module to interact with Helix Core

Examples

# Create a group
- name: Create a new group
  helix_core_group:
    state: present
    name: group1
    users:
        - root
    server: '1666'
    user: bruno
    charset: none
    password: ''

# Delete a group
- name: Delete a group
  helix_core_group:
    state: absent
    name: new_user
    server: '1666'
    user: bruno
    charset: none
    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 on the resource.

Returned: always

Can only return:

  • "created"

  • "updated"

  • "deleted"

  • "unchanged"

Sample: "created"

changed

boolean

Whether any changes were made to the group.

Returned: always

Sample: true

changes

list / elements=dictionary

List of fields that were changed.

Returned: always

Sample: [{"after": ["alice", "bob"], "before": ["alice"], "field": "Users"}]

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

group_spec

dictionary

The group specification after the operation.

Returned: always

Sample: {"Group": "developers", "MaxResults": "unset", "Users": ["alice", "bob"]}

Authors

  • Asif Shaikh (@ripclawffb)