theforeman.foreman.foreman_snapshot (0.8.1) — module

Manage Foreman Snapshots

Authors: Manisha Singhal (@Manisha15) ATIX AG

preview | supported by community

Install collection

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


Add to requirements.yml

  collections:
    - name: theforeman.foreman
      version: 0.8.1

Description

Manage Foreman Snapshots for Host Entities

This module can create, update, revert and delete snapshots

This module requires the foreman_snapshot_management plugin set up in the server

See: U(https://github.com/ATIX-AG/foreman_snapshot_management)


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: "Create a Snapshot"
  foreman_snapshot:
    username: "admin"
    password: "changeme"
    server_url: "https://foreman.example.com"
    name: "snapshot_before_software_upgrade"
    host: "server.example.com"
    state: present
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: "Update a Snapshot"
  foreman_snapshot:
    username: "admin"
    password: "changeme"
    server_url: "https://foreman.example.com"
    name: "snapshot_before_software_upgrade"
    host: "server.example.com"
    description: "description of snapshot"
    state: present
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: "Revert a Snapshot"
  foreman_snapshot:
    username: "admin"
    password: "changeme"
    server_url: "https://foreman.example.com"
    name: "snapshot_before_software_upgrade"
    host: "server.example.com"
    state: reverted
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: "Delete a Snapshot"
  foreman_snapshot:
    username: "admin"
    password: "changeme"
    server_url: "https://foreman.example.com"
    name: "snapshot_before_software_upgrade"
    host: "server.example.com"
    state: absent

Inputs

    
host:
    description:
    - Name of related Host
    required: true
    type: str

name:
    description:
    - Name of Snapshot
    required: true
    type: str

state:
    choices:
    - present
    - reverted
    - absent
    default: present
    description:
    - State of Snapshot
    type: str

password:
    description: Password of the user accessing the Foreman server
    required: true
    type: str

username:
    description: Username accessing the Foreman server
    required: true
    type: str

server_url:
    description: URL of the Foreman server
    required: true
    type: str

description:
    description:
    - Description of Snapshot
    required: false
    type: str

validate_certs:
    aliases:
    - verify_ssl
    default: true
    description: Whether or not to verify the TLS certificates of the Foreman server
    type: bool