ripclawffb.helix_core.helix_core_remote module – Manage remote specs 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_remote.

New in ripclawffb.helix_core 1.3.0

Synopsis

  • A remote specification describes the shared server that your server cooperates with.

  • Uses the p4 remote command to create, modify, or delete a remote specification.

  • 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

address

string

The P4PORT for the shared server.

archivelimits

list / elements=string

One or more entries specifying how many revisions of file archives to store locally when the files are fetched.

charset

aliases: p4charset

string

Character set used for translation of unicode files

Can also use ‘P4CHARSET’ environment variable

Default: "none"

depotmap

list / elements=string

A list of one or more lines describing the mapping from the shared server’s files to your personal server’s files.

description

string

A description of the remote spec.

Default: "Created by user."

options

string

Flags to change the remote spec behavior.

Default: "unlocked nocompress copyrcs"

owner

string

The name of the user who owns the remote spec. By default, this is the user who creates it.

password

aliases: p4passwd

string / required

The login password

Can also use ‘P4PASSWD’ environment variable

remoteid

string / required

The name of the remote spec to manage.

remoteuser

string

Specifies the identity (user) P4 Server uses to authenticate against this remote server when pushing and fetching.

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 remote spec is present or deleted.

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 Remote

Create or edit a remote spec

P4Python Pip Module

Python module to interact with Helix Core

Examples

# Create a new remote spec
- name: Create remote spec
  ripclawffb.helix_core.helix_core_remote:
    state: present
    remoteid: central-repo
    description: "Central repository shared server"
    address: "ssl:central-perforce:1666"
    depotmap:
      - "//depot/... //depot/..."
    server: '1666'
    user: bruno
    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 remote spec.

Returned: always

Sample: true

changes

list / elements=dictionary

List of fields that were changed.

Returned: always

Sample: [{"after": "New description", "before": "Old description", "field": "Description"}]

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

remote_spec

dictionary

The remote specification after the operation.

Returned: always

Sample: {"Address": "ssl:central-perforce:1666", "Description": "Central repository shared server", "RemoteID": "central-repo"}

Authors

  • Asif Shaikh (@ripclawffb)