ripclawffb.helix_core.helix_core_stream module – Manage streams 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_stream.

New in ripclawffb.helix_core 1.0.0

Synopsis

  • Create or edit an instance of a stream (also known as a stream definition).

  • 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"

description

string

Description of the stream

Default: "Created by user."

ignored

list / elements=string

A list of file or directory names to be ignored

name

string

Display name of the stream

options

string

Settings that configure stream behavior

Default: "allsubmit unlocked toparent fromparent mergedown"

owner

string

The Helix server user or group who owns the stream

parent

string

The parent of this stream

Default: "none"

parentview

string

Defines whether the stream inherits a view from its parent

Default: "inherit"

password

aliases: p4passwd

string / required

The login password

Can also use ‘P4PASSWD’ environment variable

paths

list / elements=string

Paths define how files are incorporated into the stream structure

Default: ["share ..."]

remapped

list / elements=string

Reassigns the location of workspace files

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

Choices:

  • "present" ← (default)

  • "absent"

stream

string / required

Specifies the stream’s name (permanent identifier) and its path in the stream depot, in the form //depotname/streamname

type

string

The stream’s type determines the expected flow of change. Valid stream types are mainline, development, release, virtual, andtask.

Choices:

  • "mainline"

  • "development" ← (default)

  • "release"

  • "virtual"

  • "task"

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 Stream

Create or edit an instance of a stream (also known as a stream definition).

P4Python Pip Module

Python module to interact with Helix Core

Examples

# Create a stream
- name: Create a new stream
  helix_core_stream:
    state: present
    stream: //depotname/streamname
    description: 'Development Stream'
    type: development
    paths:
      - share ...
    server: '1666'
    user: bruno
    charset: none
    password: ''

# Delete a stream
- name: Delete a stream
  helix_core_stream:
    state: absent
    name: //depotname/streamname
    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 stream.

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

stream_spec

dictionary

The stream specification after the operation.

Returned: always

Sample: {"Description": "Main stream", "Stream": "//depot/main", "Type": "mainline"}

Authors

  • Asif Shaikh (@ripclawffb)