theforeman.foreman.bookmark (4.0.0) — module

Manage Bookmarks

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

Authors: Bernhard Hopfenmueller (@Fobhep) ATIX AG, Christoffer Reijer (@ephracis) Basalt AB

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

Manage Bookmark Entities


Requirements

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: "Create a Bookmark"
  theforeman.foreman.bookmark:
    username: "admin"
    password: "changeme"
    server_url: "https://foreman.example.com"
    name: "recent"
    controller: "job_invocations"
    query: "started_at > '24 hours ago'"
    state: present_with_defaults
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: "Update a Bookmark"
  theforeman.foreman.bookmark:
    username: "admin"
    password: "changeme"
    server_url: "https://foreman.example.com"
    name: "recent"
    controller: "job_invocations"
    query: "started_at > '12 hours ago'"
    state: present
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: "Delete a Bookmark"
  theforeman.foreman.bookmark:
    username: "admin"
    password: "changeme"
    server_url: "https://foreman.example.com"
    name: "recent"
    controller: "job_invocations"
    state: absent

Inputs

    
name:
    description:
    - Name of the bookmark
    required: true
    type: str

query:
    description:
    - Query of the bookmark
    type: str

state:
    choices:
    - present
    - present_with_defaults
    - absent
    default: present
    description:
    - State of the entity
    - C(present_with_defaults) will ensure the entity exists, but won't update existing
      ones
    type: str

public:
    default: true
    description:
    - Make bookmark available for all users
    required: false
    type: bool

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

controller:
    description:
    - Controller for the bookmark
    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

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

Outputs

entity:
  contains:
    bookmarks:
      contains:
        controller:
          description: Controller, the query is performed on.
          type: str
        id:
          description: Database id of the bookmark.
          type: int
        name:
          description: Name of the bookmark.
          type: str
        owner_id:
          description: Database id of the owner entity.
          type: int
        owner_type:
          description: Class of the owner entity.
          type: str
        public:
          description: Publicity of the bookmark.
          type: bool
        query:
          description: Query to be performed on the controller.
          type: str
      description: List of bookmarks.
      elements: dict
      type: list
  description: Final state of the affected entities grouped by their type.
  returned: success
  type: dict