rapyutarobotics.rr_io.packages – Module to interact with rapyuta_io packages

Note

This plugin is part of the rapyutarobotics.rr_io collection (version 2.0.0).

You might already have this collection installed if you are using the ansible package. 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 rapyutarobotics.rr_io.

To use it in a playbook, specify: rapyutarobotics.rr_io.packages.

New in version 1.0.0: of rapyutarobotics.rr_io

Synopsis

  • This is my longer description explaining my test module.

Parameters

Parameter

Comments

executables_info

list / elements=dictionary / required

added in 2.0.0 of rapyutarobotics.rr_io

This option lets the user modify parameters of the executables present in the package manifest depending on the name of the executable.

Make sure the name of the executable is present in the package manifest.

build

string

Required when ‘type=build’.

The name of the build already existing in rapyuta.io from which to create the package.

The package waits for the build to become available if run in synchronous playbook otherwise waits until the async timeout expires.

docker_image

string

Required when ‘type=docker’.

The docker image path to be used to create the package from docker.

By default, the repository is docker.io, but a custom repository can be used by specifying the FQDN of the docker image.

name

string / required

The name of the executable of which the paramaters are to be changed.

resource_type

string

The resources to be allocated to the deployment corresponding to this package.

The values entered in the playbook overrides the value present in the package manifest.

The values are only taken into consideration if the runtime required for the package manifest is cloud.

Is case Insensitive.

Choices:

  • x_small

  • small

  • medium

  • large

  • x_large

secret

string

Required when ‘type=docker’.

The name of the secret already existing in rapyuta.io which can be used to pull the docker image from the private docker repository.

The package waits for the secret to become available if run in synchronous playbook otherwise waits until the async timeout expires.

type

string / required

There are 2 methods to create packages.

If type=build then build option is required.

If type=docker then secret and docker_image options are required.

Choices:

  • build

  • docker

manifest_path

string

added in 1.0.0 of rapyutarobotics.rr_io

Required when ‘present=true’.

The path of the package manifest relative to the playbook.

Absolute path of the package manifest can also be given, useful when executing on remote servers.

Use the copy module to transfer your manifest files to remote servers when executing on remote servers.

name

string / required

Name of the package.

package_from

string

added in 1.0.12 of rapyutarobotics.rr_io

There are 2 methods to get manifests.

If package_from=manifest_path then manifest_path option is required.

If package_from=io_project then source_io_project_info option is required.

Choices:

  • manifest_path ← (default)

  • io_project

present

boolean / required

added in 1.0.0 of rapyutarobotics.rr_io

Whether the package should be present in rapyuta.io.

Choices:

  • no

  • yes

source_io_project_info

dictionary

added in 1.0.12 of rapyutarobotics.rr_io

Required when package_from=io_project.

This option will take in the source project information from which the package manifest will be taken to use in this playbook and the auth credentials to access the package in the io project.

Either the package name or the package uid to clone from the source project.

NOTE Package id takes precedence over package name in cloning if both are specified.

auth_token

string / required

The auth token which has access to the artifacts in the source project.

package_name

string

added in 1.0.13 of rapyutarobotics.rr_io

The package name of the package which needs to be cloned from the source project.

Make sure the package name is correct and a package with the package name is present in the source project.

package_uid

string

The package id of the package from the source project which needs to be copied to the destination project.

Make sure the package id is correct and is present in the source project id mentioned in the ‘project_id option.

package_version

string

added in 1.0.13 of rapyutarobotics.rr_io

The package version can be set to semantic version which is present in the source project as a subpackage.

It can be set to max to take the highest versioned subpackage of this package from the source project.

Choices:

  • vx.y.z

  • max ← (default)

project_id

string / required

Project id from which you want to take the package.

Provide the authentication credentials which have access to this project.

NOTE It can be in any organization.

version

string / required

added in 1.0.0 of rapyutarobotics.rr_io

Use ‘auto’ to increment the package version upon the existing packages by updating the patch number of the highest versioned package.

Use ‘max’ to check the existence of a package.

Use semantical version number to create a package with the specified version.

The package number specified in the package manifest json is discarded, so specify the version only in the playbook yaml.

When present is set to false, all the packages get deleted when version is set to auto and only the highest versioned package when version is set to max and the specified package version otherwise.

Choices:

  • max ← (default)

  • auto

  • vx.y.z

Examples

-   name: rio_amr_pa package
    async: 1250
    poll: 0
    rapyutarobotics.rr_io.packages:
        name: rio_amr_pa
        present: false
        manifest_path: /tmp/rio_amr_pa.json
        executables_info:
        - name: executable_1
          type: build
          build: rio_amr_pa
        - name: executable_2
          type: docker
          docker_image: rrdockerhub/io_amr_pa:release_04_27
          secret: dockerhub
          resource_type: large

-   name: rio_amr_pa package
    async: 1250
    poll: 0
    rapyutarobotics.rr_io.packages:
        name: rio_amr_pa
        present: false
        manifest_path: /tmp/rio_amr_pa.json
        executables_info:
        - name: executable
          type: docker
          docker_image: rrdockerhub/io_amr_pa:release_04_27
          secret: dockerhub

Return Values

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

Key

Description

message

string

The output message that the test module generates.

Returned: always

Sample: “goodbye”

original_message

string

The original name param that was passed in.

Returned: always

Sample: “hello world”

Authors

  • Dhananjay Sathe (@dsathe)

  • Abhinav Gupta (@abhinavg97)