.. Document meta
:orphan:
.. |antsibull-internal-nbsp| unicode:: 0xA0
:trim:
.. meta::
:antsibull-docs: 2.26.0
.. Anchors
.. _ansible_collections.stephrobert.scaleway.power_schedule_role:
.. Title
stephrobert.scaleway.power_schedule role -- Bring a named inventory group to a power state
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
.. Collection note
.. note::
This role is part of the `stephrobert.scaleway collection `_ (version 0.7.0).
It is not included in ``ansible-core``.
To check whether it is installed, run :code:`ansible-galaxy collection list`.
To install it use: :code:`ansible\-galaxy collection install stephrobert.scaleway`.
To use it in a playbook, specify: :code:`stephrobert.scaleway.power_schedule`.
.. contents::
:local:
:depth: 2
.. _ansible_collections.stephrobert.scaleway.power_schedule_role__entrypoint-main:
.. Entry point title
Entry point ``main`` -- Bring a named inventory group to a power state
----------------------------------------------------------------------
.. version_added
.. Deprecated
Synopsis
^^^^^^^^
.. Description
- Reads each machine of the group first, then acts only on those not already where they should be. The action module is a trigger and not a state, so idempotence lives here rather than in the module.
- Machines in a transient state are named and left alone. A machine that could not be read fails the run, because a power state nobody could read is not a power state that is fine.
.. Requirements
.. Options
Parameters
^^^^^^^^^^
.. tabularcolumns:: \X{1}{3}\X{2}{3}
.. list-table::
:width: 100%
:widths: auto
:header-rows: 1
:class: longtable ansible-option-table
* - Parameter
- Comments
* - .. raw:: html
.. _ansible_collections.stephrobert.scaleway.power_schedule_role__parameter-main__scaleway_power_schedule_desired_state:
.. rst-class:: ansible-option-title
**scaleway_power_schedule_desired_state**
.. raw:: html
.. ansible-option-type-line::
:ansible-option-type:`string`
.. raw:: html
- .. raw:: html
:literal:`on` or :literal:`off`. Required as soon as a group is named.
It is validated by the role rather than by :literal:`choices`\ , so that the refusal carries the sentence that explains it.
.. rst-class:: ansible-option-line
:ansible-option-default-bold:`Default:` :ansible-option-default:`""`
.. raw:: html
* - .. raw:: html
.. _ansible_collections.stephrobert.scaleway.power_schedule_role__parameter-main__scaleway_power_schedule_group:
.. rst-class:: ansible-option-title
**scaleway_power_schedule_group**
.. raw:: html
.. ansible-option-type-line::
:ansible-option-type:`string`
.. raw:: html
- .. raw:: html
The inventory group to act on. Empty means do nothing and say so.
There is no default target, because a schedule that guesses which machines to power off is how a fleet goes down one evening.
.. rst-class:: ansible-option-line
:ansible-option-default-bold:`Default:` :ansible-option-default:`""`
.. raw:: html
* - .. raw:: html
.. _ansible_collections.stephrobert.scaleway.power_schedule_role__parameter-main__scaleway_power_schedule_selector:
.. rst-class:: ansible-option-title
**scaleway_power_schedule_selector**
.. raw:: html
.. ansible-option-type-line::
:ansible-option-type:`dictionary`
.. raw:: html
- .. raw:: html
What to act on, said the same way everywhere: exactly one of :literal:`group`\ , :literal:`name` or :literal:`tags`\ , plus :literal:`match` set to :literal:`all` or :literal:`any` when several tags are given.
:literal:`all` is the default, because it is the narrower selection: for an operation that writes, erring on the safe side means touching fewer machines, never more.
An ambiguous name is refused rather than settled, and an unknown key is refused rather than selecting nothing, because a typo and an empty fleet look alike.
.. rst-class:: ansible-option-line
:ansible-option-default-bold:`Default:` :ansible-option-default:`{}`
.. raw:: html
.. Attributes
.. Notes
.. Seealso
.. Extra links
Collection links
~~~~~~~~~~~~~~~~
.. ansible-links::
- title: "Issue Tracker"
url: "https://github.com/stephrobert/collection-scaleway/issues"
external: true
- title: "Repository (Sources)"
url: "https://github.com/stephrobert/collection-scaleway"
external: true
.. Parsing errors