theforeman.foreman.image (4.0.0) — module

Manage Images

| "added in version" 1.0.0 of theforeman.foreman"

Authors: Mark Hlawatschek (@hlawatschek) ATIX AG

Install collection

Install with ansible-galaxy collection install theforeman.foreman:==4.0.0


Add to requirements.yml

  collections:
    - name: theforeman.foreman
      version: 4.0.0

Description

Create, update, and delete Images


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: create Image for EC2
  theforeman.foreman.image:
     name: CentOS
     image_uuid: "ami-0ff760d16d9497662"
     image_username: "centos"
     operatingsystem: "CentOS 7"
     compute_resource: "AWS"
     architecture: "x86_64"

Inputs

    
name:
    description: Image name
    required: true
    type: str

uuid:
    aliases:
    - image_uuid
    description: UUID or Marketplace URN of the operatingsystem image
    required: true
    type: str

state:
    choices:
    - present
    - absent
    default: present
    description:
    - State of the entity
    type: str

password:
    description:
    - Password of the user accessing the Foreman server.
    - If the value is not specified in the task, the value of environment variable C(FOREMAN_PASSWORD)
      will be used instead.
    required: true
    type: str

username:
    description:
    - Username accessing the Foreman server.
    - If the value is not specified in the task, the value of environment variable C(FOREMAN_USERNAME)
      will be used instead.
    required: true
    type: str

user_data:
    description: Image supports user_data
    required: false
    type: bool

server_url:
    description:
    - URL of the Foreman server.
    - If the value is not specified in the task, the value of environment variable C(FOREMAN_SERVER_URL)
      will be used instead.
    required: true
    type: str

architecture:
    description: architecture of the image
    required: true
    type: str

image_password:
    description: Password that is used to login into the operating system
    required: false
    type: str

image_username:
    description: Username that is used to login into the operating system
    required: true
    type: str

validate_certs:
    default: true
    description:
    - Whether or not to verify the TLS certificates of the Foreman server.
    - If the value is not specified in the task, the value of environment variable C(FOREMAN_VALIDATE_CERTS)
      will be used instead.
    type: bool

operatingsystem:
    description:
    - Operating systems are looked up by their title which is composed as "<name> <major>.<minor>".
    - You can omit the version part as long as you only have one operating system by that
      name.
    required: true
    type: str

compute_resource:
    description: Compute resource the image is assigned to
    required: true
    type: str

Outputs

entity:
  contains:
    images:
      description: List of images.
      elements: dict
      type: list
  description: Final state of the affected entities grouped by their type.
  returned: success
  type: dict