community.general.rundeck_job_executions_info (8.5.0) — module

Query executions for a Rundeck job

| "added in version" 3.8.0 of community.general"

Authors: Phillipe Smith (@phsmith)

Install collection

Install with ansible-galaxy collection install community.general:==8.5.0


Add to requirements.yml

  collections:
    - name: community.general
      version: 8.5.0

Description

This module gets the list of executions for a specified Rundeck job.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Get Rundeck job executions info
  community.general.rundeck_job_executions_info:
    url: "https://rundeck.example.org"
    api_version: 39
    api_token: "mytoken"
    job_id: "xxxxxxxxxxxxxxxxx"
  register: rundeck_job_executions_info
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Show Rundeck job executions info
  ansible.builtin.debug:
    var: rundeck_job_executions_info.executions

Inputs

    
max:
    default: 20
    description:
    - Max results to return.
    type: int

url:
    description:
    - Rundeck instance URL.
    required: true
    type: str

force:
    default: false
    description:
    - If V(yes) do not get a cached copy.
    type: bool

job_id:
    description:
    - The job unique ID.
    required: true
    type: str

offset:
    default: 0
    description:
    - The start point to return the results.
    type: int

status:
    choices:
    - succeeded
    - failed
    - aborted
    - running
    description:
    - The job status to filter.
    type: str

api_token:
    description:
    - Rundeck User API Token.
    required: true
    type: str

use_proxy:
    default: true
    description:
    - If V(no), it will not use a proxy, even if one is defined in an environment variable
      on the target hosts.
    type: bool

client_key:
    description:
    - PEM formatted file that contains your private key to be used for SSL client authentication.
    - If O(client_cert) contains both the certificate and key, this option is not required.
    type: path

http_agent:
    default: ansible-httpget
    description:
    - Header to identify as, generally appears in web server logs.
    type: str

use_gssapi:
    default: false
    description:
    - Use GSSAPI to perform the authentication, typically this is for Kerberos or Kerberos
      through Negotiate authentication.
    - Requires the Python library L(gssapi,https://github.com/pythongssapi/python-gssapi)
      to be installed.
    - Credentials for GSSAPI can be specified with O(url_username)/O(url_password) or
      with the GSSAPI env var C(KRB5CCNAME) that specified a custom Kerberos credential
      cache.
    - NTLM authentication is B(not) supported even if the GSSAPI mech for NTLM has been
      installed.
    type: bool
    version_added: '2.11'
    version_added_collection: ansible.builtin

api_version:
    default: 39
    description:
    - Rundeck API version to be used.
    - API version must be at least 14.
    type: int

client_cert:
    description:
    - PEM formatted certificate chain file to be used for SSL client authentication.
    - This file can also include the key as well, and if the key is included, O(client_key)
      is not required.
    type: path

url_password:
    description:
    - The password for use in HTTP basic authentication.
    - If the O(url_username) parameter is not specified, the O(url_password) parameter
      will not be used.
    type: str

url_username:
    description:
    - The username for use in HTTP basic authentication.
    - This parameter can be used without O(url_password) for sites that allow empty passwords
    type: str

validate_certs:
    default: true
    description:
    - If V(no), SSL certificates will not be validated.
    - This should only be used on personally controlled sites using self-signed certificates.
    type: bool

force_basic_auth:
    default: false
    description:
    - Credentials specified with O(url_username) and O(url_password) should be passed
      in HTTP Header.
    type: bool

Outputs

executions:
  description: Job executions list.
  elements: dict
  returned: always
  sample:
  - argstring: -exit_code 0
    date-ended:
      date: '2021-10-06T13:05:18Z'
      unixtime: 1633525518386
    date-started:
      date: '2021-10-06T13:05:15Z'
      unixtime: 1633525515026
    description: 'Plugin[com.batix.rundeck.plugins.AnsiblePlaybookInlineWorkflowStep,
      nodeStep: false]'
    executionType: user
    href: https://rundeck.example.org/api/39/execution/1
    id: 1
    job:
      averageDuration: 6381
      description: ''
      group: ''
      href: https://rundeck.example.org/api/39/job/697af0c4-72d3-4c15-86a3-b5bfe3c6cb6a
      id: 697af0c4-72d3-4c15-86a3-b5bfe3c6cb6a
      name: Test
      options:
        exit_code: '0'
      permalink: https://rundeck.example.org/project/myproject/job/show/697af0c4-72d3-4c15-86a3-b5bfe3c6cb6a
      project: myproject
    permalink: https://rundeck.example.org/project/myproject/execution/show/1
    project: myproject
    serverUUID: 5b9a1438-fa3a-457e-b254-8f3d70338068
    status: succeeded
    user: admin
  type: list
paging:
  contains:
    count:
      description: Number of results in the response.
      returned: success
      type: int
    max:
      description: Maximum number of results per page.
      returned: success
      type: int
    offset:
      description: Offset from first of all results.
      returned: success
      type: int
    total:
      description: Total number of results.
      returned: success
      type: int
  description: Results pagination info.
  returned: success
  sample:
    count: 20
    max: 20
    offset: 0
    total: 100
  type: dict