theforeman / theforeman.foreman / 4.0.0 / module / snapshot Manage Snapshots | "added in version" 1.0.0 of theforeman.foreman" Authors: Manisha Singhal (@Manisha15) ATIX AGtheforeman.foreman.snapshot (4.0.0) — module
Install with ansible-galaxy collection install theforeman.foreman:==4.0.0
collections: - name: theforeman.foreman version: 4.0.0
Manage 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)
- name: "Create a Snapshot" theforeman.foreman.snapshot: username: "admin" password: "changeme" server_url: "https://foreman.example.com" name: "snapshot_before_software_upgrade" host: "server.example.com" state: present
- name: "Create Snapshots with same name" theforeman.foreman.snapshot: username: "admin" password: "changeme" server_url: "https://foreman.example.com" name: "snapshot_before_software_upgrade" host: "server.example.com" state: new_snapshot
- name: "Update a Snapshot" theforeman.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
- name: "Update a Snapshot with same name" theforeman.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 id: "snapshot-id"
- name: "Revert a Snapshot" theforeman.foreman.snapshot: username: "admin" password: "changeme" server_url: "https://foreman.example.com" name: "snapshot_before_software_upgrade" host: "server.example.com" state: reverted
- name: "Delete a Snapshot" theforeman.foreman.snapshot: username: "admin" password: "changeme" server_url: "https://foreman.example.com" name: "snapshot_before_software_upgrade" host: "server.example.com" state: absent
id: description: - Id of Snapshot required: false type: str host: description: - Name of related Host required: true type: str name: description: - Name of Snapshot required: true type: str state: choices: - present - reverted - absent - new_snapshot default: present description: - State of Snapshot 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 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 description: description: - Description of Snapshot required: false type: str include_ram: description: - Option to add RAM (only available for VMWare compute-resource) required: false type: bool 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
entity: contains: snapshots: description: List of snapshots. elements: dict type: list description: Final state of the affected entities grouped by their type. returned: success type: dict