ripclawffb.helix_core.helix_core_server module – This module will allow you to manage server spec on Perforce Helix Core

Note

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

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

Synopsis

  • A server specification describes the high-level configuration and intended usage of a Helix Server. For installations with only one Helix Server, the server specification is optional.

  • This module supports check mode.

Requirements

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

  • P4Python pip module is required. Tested with 2018.2.1743033

Parameters

Parameter

Comments

address

string

The P4PORT used by this server

allowedaddresses

list / elements=string

A list of addresses that are valid this server

archivedatafilter

list / elements=string

For a replica server, this optional field can contain one or more patterns describing the policy for automatically scheduling the replication of file content. If this field is present, only those files described by the pattern are automatically transferred to the replica; other files are not transferred until they are referenced by a replica command that needs the file content.

charset

aliases: p4charset

string

Character set used for translation of unicode files

Can also use ‘P4CHARSET’ environment variable

Default: “none”

clientdatafilter

list / elements=string

For a replica server, this optional field can contain one or more patterns describing how active client workspace metadata is to be filtered. Active client workspace data includes have lists, working records, and pending resolves.

description

string

A textual description of the server

Default: “Created by user.”

distributedconfig

list / elements=string

For all server types, this field shows a line for each configurable that is set to a non-default value. In this field, the admin can edit certain values, add a new line to set certain configurables to a non-default value, or delete a line to reset certain configurables to their default value.

externaladdress

string

This field contains the external address the commit server requires for connection to the edge server

name

string

The P4NAME associated with this server. You can leave this blank or you can set it to the same value as the serverid.

options

string

Controls how metadata is replicated to replicas

Default: “nomandatory”

password

aliases: p4passwd

string / required

The user password

Can also use ‘P4PASSWD’ environment variable

replicatingfrom

string

Server ID of the server from which this server is replicating or journalcopy’ing

revisiondatafilter

list / elements=string

For a replica server, this optional field can contain one or more patterns describing how submitted revision metadata is to be filtered. Submitted revision data includes revision records, integration records, label contents, and the files listed in submitted changelists.

server

aliases: p4port

string / required

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

Can also use ‘P4PORT’ environment variable

serverid

string / required

A unique identifier for this server

services

string

The server type server provides

Default: “standard”

serviceuser

string

The service user name used by the server (this is the user field in server spec)

state

string

Determines if the server spec is present or deleted

Choices:

  • present ← (default)

  • absent

type

string

Server executable type

Default: “server”

updatecachedrepos

string

Beginning in 2019.2, this optional field can contain a list of repos to be updated, with each repo name on a separate line

user

aliases: p4user

string / required

A user with access to create clients/workspaces

Can also use ‘P4USER’ environment variable

See Also

See also

Helix Core Server

Create, modify, or delete a Helix server specification

P4Python Pip Module

Python module to interact with Helix Core

Examples

# Create a server spec
- name: Create a new server spec
  helix_core_server:
    state: present
    serverid: commit
    description: 'Commit server'
    services: standard
    server: '1666'
    user: bruno
    charset: none
    password: ''
# Create a filtered edge server spec
- name: Create filtered edge server
  helix_core_server:
    state: present
    serverid: edge_replica
    description: 'Created by root.'
    archivedatafilter:
      - //depot1/...
      - -//depot2/...
    clientdatafilter:
      - -//workstation1/...
    revisiondatafilter:
      - //depot1/...
      - -//depot2/...
    services: edge-server
    server: '1666'
    user: bruno
    charset: auto
    password: ''
# Delete a server spec
- name: Delete a server spec
  helix_core_server:
    state: absent
    serverid: commit
    server: '1666'
    user: bruno
    charset: none
    password: ''

Authors

  • Asif Shaikh (@ripclawffb)