infra.eda_configuration.rulebook_activation (1.1.0) — module

Manage a rulebook_activation in EDA Controller

Authors: Tom Page (@Tompage1994)

preview | supported by community

Install collection

Install with ansible-galaxy collection install infra.eda_configuration:==1.1.0


Add to requirements.yml

  collections:
    - name: infra.eda_configuration
      version: 1.1.0

Description

Create, enable, disable and delete rulebook activations in EDA Controller

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Create eda rulebook activation
  infra.eda_configuration.rulebook_activation:
    name: Github Hook
    description: Hook to listen for changes in GitHub
    project: eda_examples
    rulebook: git-hook-deploy-rules.yml
    decision_environment: my_de
    extra_vars:
      provider: github
      repo_url: https://github.com/ansible/ansible-rulebook.git
    enabled: true
    awx_token: my_token
    state: present
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Restart eda rulebook activation
  infra.eda_configuration.rulebook_activation:
    name: Github Hook
    state: restarted
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Delete eda rulebook activation
  infra.eda_configuration.rulebook_activation:
    name: Github Hook
    state: absent

Inputs

    
name:
    description:
    - The name of the rulebook activation.
    required: true
    type: str

state:
    choices:
    - present
    - absent
    - restarted
    default: present
    description:
    - Desired state of the resource.
    type: str

enabled:
    default: true
    description:
    - Whether the rulebook activation is automatically enabled to run.
    type: bool

project:
    description:
    - The project from which the rulebook is found.
    required: false
    type: str

eda_host:
    aliases:
    - eda_hostname
    description:
    - URL to Ansible Galaxy or EDA Controller instance.
    - If value not set, will try environment variable C(EDA_HOST)
    - If value not specified by any means, the value of C(127.0.0.1) will be used
    type: str

rulebook:
    description:
    - The name of the rulebook to activate.
    required: true
    type: str

awx_token:
    description:
    - The token used to authenticate to controller.
    required: false
    type: str

eda_token:
    description:
    - The Ansible Galaxy or EDA Controller API token to use.
    - This value can be in one of two formats.
    - A string which is the token itself. (i.e. bqV5txm97wqJqtkxlMkhQz0pKhRMMX)
    - A dictionary structure as returned by the eda_token module.
    - If value not set, will try environment variable C(EDA_API_TOKEN)
    type: raw

extra_vars:
    description:
    - Specify C(extra_vars) for the template.
    required: false
    type: dict

description:
    description:
    - The description of the rulebook_activation.
    required: false
    type: str

eda_password:
    description:
    - Password for your Ansible Galaxy or EDA Controller instance.
    - If value not set, will try environment variable C(EDA_PASSWORD)
    type: str

eda_username:
    description:
    - Username for your Ansible Galaxy or EDA Controller instance.
    - If value not set, will try environment variable C(EDA_USERNAME)
    type: str

restart_policy:
    choices:
    - always
    - never
    - on_failure
    default: always
    description:
    - The policy used to determine whether to restart a rulebook.
    required: false
    type: str

validate_certs:
    aliases:
    - eda_verify_ssl
    description:
    - Whether to allow insecure connections to Galaxy or EDA Controller Server.
    - If C(no), SSL certificates will not be validated.
    - This should only be used on personally controlled sites using self-signed certificates.
    - If value not set, will try environment variable C(EDA_VERIFY_SSL)
    type: bool

request_timeout:
    description:
    - Specify the timeout Ansible should use in requests to the Galaxy or EDA Controller
      host.
    - Defaults to 10s, but this is handled by the shared module_utils code
    type: float

decision_environment:
    description:
    - The decision environment to be used.
    required: true
    type: str