community.general.cs_configuration (0.1.1) — module

Manages configuration on Apache CloudStack based clouds.

Authors: René Moser (@resmo)

stableinterface | supported by community

Install collection

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


Add to requirements.yml

  collections:
    - name: community.general
      version: 0.1.1

Description

Manages global, zone, account, storage and cluster configurations.


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Ensure global configuration
  cs_configuration:
    name: router.reboot.when.outofband.migrated
    value: false
  delegate_to: localhost
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Ensure zone configuration
  cs_configuration:
    name: router.reboot.when.outofband.migrated
    zone: ch-gva-01
    value: true
  delegate_to: localhost
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Ensure storage configuration
  cs_configuration:
    name: storage.overprovisioning.factor
    storage: storage01
    value: 2.0
  delegate_to: localhost
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Ensure account configuration
  cs_configuration:
    name: allow.public.user.templates
    value: false
    account: acme inc
    domain: customers
  delegate_to: localhost

Inputs

    
name:
    description:
    - Name of the configuration.
    required: true
    type: str

zone:
    description:
    - Ensure the value for corresponding zone.
    type: str

value:
    description:
    - Value of the configuration.
    required: true
    type: str

domain:
    default: ROOT
    description:
    - Domain the account is related to.
    - Only considered if I(account) is used.
    type: str

account:
    description:
    - Ensure the value for corresponding account.
    type: str

api_key:
    description:
    - API key of the CloudStack API.
    - If not given, the C(CLOUDSTACK_KEY) env variable is considered.
    - As the last option, the value is taken from the ini config file, also see the notes.
    type: str

api_url:
    description:
    - URL of the CloudStack API e.g. https://cloud.example.com/client/api.
    - If not given, the C(CLOUDSTACK_ENDPOINT) env variable is considered.
    - As the last option, the value is taken from the ini config file, also see the notes.
    type: str

cluster:
    description:
    - Ensure the value for corresponding cluster.
    type: str

storage:
    description:
    - Ensure the value for corresponding storage pool.
    type: str

api_region:
    default: cloudstack
    description:
    - Name of the ini section in the C(cloustack.ini) file.
    - If not given, the C(CLOUDSTACK_REGION) env variable is considered.
    type: str

api_secret:
    description:
    - Secret key of the CloudStack API.
    - If not set, the C(CLOUDSTACK_SECRET) env variable is considered.
    - As the last option, the value is taken from the ini config file, also see the notes.
    type: str

api_timeout:
    description:
    - HTTP timeout in seconds.
    - If not given, the C(CLOUDSTACK_TIMEOUT) env variable is considered.
    - As the last option, the value is taken from the ini config file, also see the notes.
    - Fallback value is 10 seconds if not specified.
    type: int

api_http_method:
    choices:
    - get
    - post
    description:
    - HTTP method used to query the API endpoint.
    - If not given, the C(CLOUDSTACK_METHOD) env variable is considered.
    - As the last option, the value is taken from the ini config file, also see the notes.
    - Fallback value is C(get) if not specified.
    type: str

Outputs

Domain:
  description: Domain of account of the configuration.
  returned: success
  sample: ROOT
  type: str
account:
  description: Account of the configuration.
  returned: success
  sample: admin
  type: str
category:
  description: Category of the configuration.
  returned: success
  sample: Advanced
  type: str
cluster:
  description: Cluster of the configuration.
  returned: success
  sample: cluster01
  type: str
description:
  description: Description of the configuration.
  returned: success
  sample: Setup the host to do multipath
  type: str
name:
  description: Name of the configuration.
  returned: success
  sample: zone.vlan.capacity.notificationthreshold
  type: str
scope:
  description: Scope (zone/cluster/storagepool/account) of the parameter that needs
    to be updated.
  returned: success
  sample: storagepool
  type: str
storage:
  description: Storage of the configuration.
  returned: success
  sample: storage01
  type: str
value:
  description: Value of the configuration.
  returned: success
  sample: '0.75'
  type: str
zone:
  description: Zone of the configuration.
  returned: success
  sample: ch-gva-01
  type: str