.. Document meta :orphan: .. |antsibull-internal-nbsp| unicode:: 0xA0 :trim: .. meta:: :antsibull-docs: 2.26.0 .. Anchors .. _ansible_collections.stephrobert.scaleway.compute_inventory: .. Anchors: short name for ansible.builtin .. Title stephrobert.scaleway.compute inventory -- Scaleway compute dynamic inventory ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ .. Collection note .. note:: This inventory plugin 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`. You need further requirements to be able to use this inventory plugin, see :ref:`Requirements ` for details. To use it in a playbook, specify: :code:`stephrobert.scaleway.compute`. .. version_added .. rst-class:: ansible-version-added New in stephrobert.scaleway 0.1.0 .. contents:: :local: :depth: 1 .. Deprecated Synopsis -------- .. Description - Builds an Ansible inventory from a Scaleway account. - Discovers hosts product by product, then enriches them with their private networks and VPCs by listing IPAM once per region rather than once per network interface. - Uses a configuration file whose name ends with :literal:`scaleway.yml` or :literal:`scw.yml`. .. Aliases .. Requirements .. _ansible_collections.stephrobert.scaleway.compute_inventory_requirements: Requirements ------------ The below requirements are needed on the local controller node that executes this inventory. - scaleway \>= 2.9.0 .. 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.compute_inventory__parameter-access_key: .. rst-class:: ansible-option-title **access_key** .. raw:: html .. ansible-option-type-line:: :ansible-option-type:`string` .. raw:: html
- .. raw:: html
Scaleway API access key. .. rst-class:: ansible-option-line :ansible-option-configuration:`Configuration:` - Environment variable: :envvar:`SCW\_ACCESS\_KEY` .. raw:: html
* - .. raw:: html
.. _ansible_collections.stephrobert.scaleway.compute_inventory__parameter-address: .. rst-class:: ansible-option-title **address** .. raw:: html .. ansible-option-type-line:: :ansible-option-type:`dictionary` .. raw:: html
- .. raw:: html
Restrict :literal:`ansible\_host` to one private network. Accepts :literal:`private\_network`\ , a name or an ID, or :literal:`private\_network\_id`. .. rst-class:: ansible-option-line :ansible-option-default-bold:`Default:` :ansible-option-default:`{}` .. raw:: html
* - .. raw:: html
.. _ansible_collections.stephrobert.scaleway.compute_inventory__parameter-address_priority: .. rst-class:: ansible-option-title **address_priority** .. raw:: html .. ansible-option-type-line:: :ansible-option-type:`list` / :ansible-option-elements:`elements=string` .. raw:: html
- .. raw:: html
Address families to try, in order, when setting :literal:`ansible\_host`. .. rst-class:: ansible-option-line :ansible-option-default-bold:`Default:` :ansible-option-default:`["private\_ipv4", "public\_ipv4", "private\_ipv6", "public\_ipv6"]` .. raw:: html
* - .. raw:: html
.. _ansible_collections.stephrobert.scaleway.compute_inventory__parameter-api_allow_insecure: .. rst-class:: ansible-option-title **api_allow_insecure** .. raw:: html .. ansible-option-type-line:: :ansible-option-type:`boolean` .. raw:: html
- .. raw:: html
Reach the endpoint without verifying its TLS certificate. .. rst-class:: ansible-option-line :ansible-option-choices:`Choices:` - :ansible-option-choices-entry:`false` - :ansible-option-choices-entry:`true` .. raw:: html
* - .. raw:: html
.. _ansible_collections.stephrobert.scaleway.compute_inventory__parameter-api_url: .. rst-class:: ansible-option-title **api_url** .. raw:: html .. ansible-option-type-line:: :ansible-option-type:`string` .. raw:: html
- .. raw:: html
URL of the Scaleway API endpoint. Point it at a local emulator to build an inventory without credentials. Falls back to the Scaleway configuration file, then to :literal:`https://api.scaleway.com`. It carries no default on purpose: a default is never unset, so it would always override the profile. .. rst-class:: ansible-option-line :ansible-option-configuration:`Configuration:` - Environment variable: :envvar:`SCW\_API\_URL` .. raw:: html
* - .. raw:: html
.. _ansible_collections.stephrobert.scaleway.compute_inventory__parameter-cache: .. rst-class:: ansible-option-title **cache** .. raw:: html .. ansible-option-type-line:: :ansible-option-type:`boolean` .. raw:: html
- .. raw:: html
Toggle to enable/disable the caching of the inventory's source data, requires a cache plugin setup to work. .. rst-class:: ansible-option-line :ansible-option-choices:`Choices:` - :ansible-option-choices-entry-default:`false` :ansible-option-choices-default-mark:`← (default)` - :ansible-option-choices-entry:`true` .. rst-class:: ansible-option-line :ansible-option-configuration:`Configuration:` - INI entry: .. code-block:: ini [inventory] cache = false - Environment variable: :envvar:`ANSIBLE\_INVENTORY\_CACHE` .. raw:: html
* - .. raw:: html
.. _ansible_collections.stephrobert.scaleway.compute_inventory__parameter-cache_connection: .. rst-class:: ansible-option-title **cache_connection** .. raw:: html .. ansible-option-type-line:: :ansible-option-type:`string` .. raw:: html
- .. raw:: html
Cache connection data or path, read cache plugin documentation for specifics. .. rst-class:: ansible-option-line :ansible-option-configuration:`Configuration:` - INI entries: .. code-block:: ini [defaults] fact_caching_connection = VALUE .. code-block:: ini [inventory] cache_connection = VALUE - Environment variable: :envvar:`ANSIBLE\_CACHE\_PLUGIN\_CONNECTION` - Environment variable: :envvar:`ANSIBLE\_INVENTORY\_CACHE\_CONNECTION` .. raw:: html
* - .. raw:: html
.. _ansible_collections.stephrobert.scaleway.compute_inventory__parameter-cache_plugin: .. rst-class:: ansible-option-title **cache_plugin** .. raw:: html .. ansible-option-type-line:: :ansible-option-type:`string` .. raw:: html
- .. raw:: html
Cache plugin to use for the inventory's source data. .. rst-class:: ansible-option-line :ansible-option-default-bold:`Default:` :ansible-option-default:`"memory"` .. rst-class:: ansible-option-line :ansible-option-configuration:`Configuration:` - INI entries: .. code-block:: ini [defaults] fact_caching = memory .. code-block:: ini [inventory] cache_plugin = memory - Environment variable: :envvar:`ANSIBLE\_CACHE\_PLUGIN` - Environment variable: :envvar:`ANSIBLE\_INVENTORY\_CACHE\_PLUGIN` .. raw:: html
* - .. raw:: html
.. _ansible_collections.stephrobert.scaleway.compute_inventory__parameter-cache_prefix: .. rst-class:: ansible-option-title **cache_prefix** .. raw:: html .. ansible-option-type-line:: :ansible-option-type:`string` .. raw:: html
- .. raw:: html
Prefix to use for cache plugin files/tables. .. rst-class:: ansible-option-line :ansible-option-default-bold:`Default:` :ansible-option-default:`"ansible\_inventory\_"` .. rst-class:: ansible-option-line :ansible-option-configuration:`Configuration:` - INI entries: .. code-block:: ini [defaults] fact_caching_prefix = ansible_inventory_ .. code-block:: ini [inventory] cache_prefix = ansible_inventory_ - Environment variable: :envvar:`ANSIBLE\_CACHE\_PLUGIN\_PREFIX` - Environment variable: :envvar:`ANSIBLE\_INVENTORY\_CACHE\_PLUGIN\_PREFIX` .. raw:: html
* - .. raw:: html
.. _ansible_collections.stephrobert.scaleway.compute_inventory__parameter-cache_timeout: .. rst-class:: ansible-option-title **cache_timeout** .. raw:: html .. ansible-option-type-line:: :ansible-option-type:`integer` .. raw:: html
- .. raw:: html
Cache duration in seconds. .. rst-class:: ansible-option-line :ansible-option-default-bold:`Default:` :ansible-option-default:`3600` .. rst-class:: ansible-option-line :ansible-option-configuration:`Configuration:` - INI entries: .. code-block:: ini [defaults] fact_caching_timeout = 3600 .. code-block:: ini [inventory] cache_timeout = 3600 - Environment variable: :envvar:`ANSIBLE\_CACHE\_PLUGIN\_TIMEOUT` - Environment variable: :envvar:`ANSIBLE\_INVENTORY\_CACHE\_TIMEOUT` .. raw:: html
* - .. raw:: html
.. _ansible_collections.stephrobert.scaleway.compute_inventory__parameter-compose: .. rst-class:: ansible-option-title **compose** .. raw:: html .. ansible-option-type-line:: :ansible-option-type:`dictionary` .. raw:: html
- .. raw:: html
Create vars from jinja2 expressions. .. rst-class:: ansible-option-line :ansible-option-default-bold:`Default:` :ansible-option-default:`{}` .. raw:: html
* - .. raw:: html
.. _ansible_collections.stephrobert.scaleway.compute_inventory__parameter-config_file: .. rst-class:: ansible-option-title **config_file** .. raw:: html .. ansible-option-type-line:: :ansible-option-type:`path` .. raw:: html
- .. raw:: html
Path to the Scaleway configuration file. .. rst-class:: ansible-option-line :ansible-option-configuration:`Configuration:` - Environment variable: :envvar:`SCW\_CONFIG\_PATH` .. raw:: html
* - .. raw:: html
.. _ansible_collections.stephrobert.scaleway.compute_inventory__parameter-exclude: .. rst-class:: ansible-option-title **exclude** .. raw:: html .. ansible-option-type-line:: :ansible-option-type:`dictionary` .. raw:: html
- .. raw:: html
Drop hosts matching these tags or states, after every other filter. .. rst-class:: ansible-option-line :ansible-option-default-bold:`Default:` :ansible-option-default:`{}` .. raw:: html
* - .. raw:: html
.. _ansible_collections.stephrobert.scaleway.compute_inventory__parameter-group_by: .. rst-class:: ansible-option-title **group_by** .. raw:: html .. ansible-option-type-line:: :ansible-option-type:`list` / :ansible-option-elements:`elements=string` .. raw:: html
- .. raw:: html
Axes used to build the native :literal:`scw\_\*` groups. .. rst-class:: ansible-option-line :ansible-option-choices:`Choices:` - :ansible-option-choices-entry-default:`"product"` :ansible-option-choices-default-mark:`← (default)` - :ansible-option-choices-entry-default:`"project"` :ansible-option-choices-default-mark:`← (default)` - :ansible-option-choices-entry-default:`"region"` :ansible-option-choices-default-mark:`← (default)` - :ansible-option-choices-entry-default:`"zone"` :ansible-option-choices-default-mark:`← (default)` - :ansible-option-choices-entry:`"state"` - :ansible-option-choices-entry:`"tags"` - :ansible-option-choices-entry:`"vpc"` - :ansible-option-choices-entry:`"private\_network"` .. rst-class:: ansible-option-line :ansible-option-default-bold:`Default:` :ansible-option-default:`["product", "project", "region", "zone"]` .. raw:: html
* - .. raw:: html
.. _ansible_collections.stephrobert.scaleway.compute_inventory__parameter-groups: .. rst-class:: ansible-option-title **groups** .. raw:: html .. ansible-option-type-line:: :ansible-option-type:`dictionary` .. raw:: html
- .. raw:: html
Add hosts to group based on Jinja2 conditionals. .. rst-class:: ansible-option-line :ansible-option-default-bold:`Default:` :ansible-option-default:`{}` .. raw:: html
* - .. raw:: html
.. _ansible_collections.stephrobert.scaleway.compute_inventory__parameter-hostnames: .. rst-class:: ansible-option-title **hostnames** .. raw:: html .. ansible-option-type-line:: :ansible-option-type:`list` / :ansible-option-elements:`elements=string` .. raw:: html
- .. raw:: html
Sources for :literal:`inventory\_hostname`\ , in order of precedence. Accepts :literal:`name`\ , :literal:`id`\ , :literal:`public\_ipv4`\ , :literal:`public\_ipv6`\ , :literal:`private\_ipv4`\ , :literal:`private\_ipv6` and :literal:`tag:KEY`\ , which reads a :literal:`KEY=value` tag. The names :literal:`hostname`\ , :literal:`vpc\_ipv4` and :literal:`vpc\_ipv6` used by the official collection are accepted as aliases. Collisions are resolved by appending the zone, then the resource ID. .. rst-class:: ansible-option-line :ansible-option-default-bold:`Default:` :ansible-option-default:`["name", "id"]` .. raw:: html
* - .. raw:: html
.. _ansible_collections.stephrobert.scaleway.compute_inventory__parameter-include_raw: .. rst-class:: ansible-option-title **include_raw** .. raw:: html .. ansible-option-type-line:: :ansible-option-type:`boolean` .. raw:: html
- .. raw:: html
Expose the raw API object as :literal:`scaleway\_raw`. Off by default. .. rst-class:: ansible-option-line :ansible-option-choices:`Choices:` - :ansible-option-choices-entry-default:`false` :ansible-option-choices-default-mark:`← (default)` - :ansible-option-choices-entry:`true` .. raw:: html
* - .. raw:: html
.. _ansible_collections.stephrobert.scaleway.compute_inventory__parameter-keyed_groups: .. rst-class:: ansible-option-title **keyed_groups** .. raw:: html .. ansible-option-type-line:: :ansible-option-type:`list` / :ansible-option-elements:`elements=dictionary` .. raw:: html
- .. raw:: html
Add hosts to group based on the values of a variable. .. rst-class:: ansible-option-line :ansible-option-default-bold:`Default:` :ansible-option-default:`[]` .. raw:: html
* - .. raw:: html
.. raw:: latex \hspace{0.02\textwidth}\begin{minipage}[t]{0.3\textwidth} .. _ansible_collections.stephrobert.scaleway.compute_inventory__parameter-keyed_groups/default_value: .. rst-class:: ansible-option-title **default_value** .. raw:: html .. ansible-option-type-line:: :ansible-option-type:`string` :ansible-option-versionadded:`added in ansible-core 2.12` .. raw:: html
.. raw:: latex \end{minipage} - .. raw:: html
The default value when the host variable's value is :ansval:`None` or an empty string. This option is mutually exclusive with :ansopt:`stephrobert.scaleway.compute#inventory:keyed\_groups[].trailing\_separator`. .. raw:: html
* - .. raw:: html
.. raw:: latex \hspace{0.02\textwidth}\begin{minipage}[t]{0.3\textwidth} .. _ansible_collections.stephrobert.scaleway.compute_inventory__parameter-keyed_groups/key: .. rst-class:: ansible-option-title **key** .. raw:: html .. ansible-option-type-line:: :ansible-option-type:`string` .. raw:: html
.. raw:: latex \end{minipage} - .. raw:: html
The key from input dictionary used to generate groups. .. raw:: html
* - .. raw:: html
.. raw:: latex \hspace{0.02\textwidth}\begin{minipage}[t]{0.3\textwidth} .. _ansible_collections.stephrobert.scaleway.compute_inventory__parameter-keyed_groups/parent_group: .. rst-class:: ansible-option-title **parent_group** .. raw:: html .. ansible-option-type-line:: :ansible-option-type:`string` .. raw:: html
.. raw:: latex \end{minipage} - .. raw:: html
parent group for keyed group. .. raw:: html
* - .. raw:: html
.. raw:: latex \hspace{0.02\textwidth}\begin{minipage}[t]{0.3\textwidth} .. _ansible_collections.stephrobert.scaleway.compute_inventory__parameter-keyed_groups/prefix: .. rst-class:: ansible-option-title **prefix** .. raw:: html .. ansible-option-type-line:: :ansible-option-type:`string` .. raw:: html
.. raw:: latex \end{minipage} - .. raw:: html
A keyed group name will start with this prefix. .. rst-class:: ansible-option-line :ansible-option-default-bold:`Default:` :ansible-option-default:`""` .. raw:: html
* - .. raw:: html
.. raw:: latex \hspace{0.02\textwidth}\begin{minipage}[t]{0.3\textwidth} .. _ansible_collections.stephrobert.scaleway.compute_inventory__parameter-keyed_groups/separator: .. rst-class:: ansible-option-title **separator** .. raw:: html .. ansible-option-type-line:: :ansible-option-type:`string` .. raw:: html
.. raw:: latex \end{minipage} - .. raw:: html
separator used to build the keyed group name. .. rst-class:: ansible-option-line :ansible-option-default-bold:`Default:` :ansible-option-default:`"\_"` .. raw:: html
* - .. raw:: html
.. raw:: latex \hspace{0.02\textwidth}\begin{minipage}[t]{0.3\textwidth} .. _ansible_collections.stephrobert.scaleway.compute_inventory__parameter-keyed_groups/trailing_separator: .. rst-class:: ansible-option-title **trailing_separator** .. raw:: html .. ansible-option-type-line:: :ansible-option-type:`boolean` :ansible-option-versionadded:`added in ansible-core 2.12` .. raw:: html
.. raw:: latex \end{minipage} - .. raw:: html
Set this option to :ansval:`false` to omit the :ansopt:`stephrobert.scaleway.compute#inventory:keyed\_groups[].separator` after the host variable when the value is :ansval:`None` or an empty string. This option is mutually exclusive with :ansopt:`stephrobert.scaleway.compute#inventory:keyed\_groups[].default\_value`. .. rst-class:: ansible-option-line :ansible-option-choices:`Choices:` - :ansible-option-choices-entry:`false` - :ansible-option-choices-entry-default:`true` :ansible-option-choices-default-mark:`← (default)` .. raw:: html
* - .. raw:: html
.. _ansible_collections.stephrobert.scaleway.compute_inventory__parameter-leading_separator: .. rst-class:: ansible-option-title **leading_separator** .. raw:: html .. ansible-option-type-line:: :ansible-option-type:`boolean` :ansible-option-versionadded:`added in ansible-core 2.11` .. raw:: html
- .. raw:: html
Use in conjunction with :ansopt:`stephrobert.scaleway.compute#inventory:keyed\_groups`. By default, a keyed group that does not have a prefix or a separator provided will have a name that starts with an underscore. This is because the default prefix is :ansval:`""` and the default separator is :ansval:`"\_"`. Set this option to :ansval:`false` to omit the leading underscore (or other separator) if no prefix is given. If the group name is derived from a mapping the separator is still used to concatenate the items. To not use a separator in the group name at all, set the separator for the keyed group to an empty string instead. .. rst-class:: ansible-option-line :ansible-option-choices:`Choices:` - :ansible-option-choices-entry:`false` - :ansible-option-choices-entry-default:`true` :ansible-option-choices-default-mark:`← (default)` .. raw:: html
* - .. raw:: html
.. _ansible_collections.stephrobert.scaleway.compute_inventory__parameter-organization_id: .. rst-class:: ansible-option-title **organization_id** .. raw:: html .. ansible-option-type-line:: :ansible-option-type:`string` .. raw:: html
- .. raw:: html
Default Organization ID. .. rst-class:: ansible-option-line :ansible-option-configuration:`Configuration:` - Environment variable: :envvar:`SCW\_DEFAULT\_ORGANIZATION\_ID` .. raw:: html
* - .. raw:: html
.. _ansible_collections.stephrobert.scaleway.compute_inventory__parameter-organizations: .. rst-class:: ansible-option-title **organizations** .. raw:: html .. ansible-option-type-line:: :ansible-option-type:`list` / :ansible-option-elements:`elements=string` .. raw:: html
- .. raw:: html
Organization IDs to restrict discovery to. .. rst-class:: ansible-option-line :ansible-option-default-bold:`Default:` :ansible-option-default:`[]` .. raw:: html
* - .. raw:: html
.. _ansible_collections.stephrobert.scaleway.compute_inventory__parameter-plugin: .. rst-class:: ansible-option-title **plugin** .. raw:: html .. ansible-option-type-line:: :ansible-option-type:`string` / :ansible-option-required:`required` .. raw:: html
- .. raw:: html
The name of this plugin. .. rst-class:: ansible-option-line :ansible-option-choices:`Choices:` - :ansible-option-choices-entry:`"stephrobert.scaleway.compute"` .. raw:: html
* - .. raw:: html
.. _ansible_collections.stephrobert.scaleway.compute_inventory__parameter-products: .. rst-class:: ansible-option-title **products** .. raw:: html .. ansible-option-type-line:: :ansible-option-type:`list` / :ansible-option-elements:`elements=string` .. raw:: html
- .. raw:: html
Products to discover hosts from. :literal:`all` means every host product this plugin version supports. .. rst-class:: ansible-option-line :ansible-option-default-bold:`Default:` :ansible-option-default:`["all"]` .. raw:: html
* - .. raw:: html
.. _ansible_collections.stephrobert.scaleway.compute_inventory__parameter-profile: .. rst-class:: ansible-option-title **profile** .. raw:: html .. ansible-option-type-line:: :ansible-option-type:`string` .. raw:: html
- .. raw:: html
Name of the profile to read in the Scaleway configuration file. .. rst-class:: ansible-option-line :ansible-option-configuration:`Configuration:` - Environment variable: :envvar:`SCW\_PROFILE` .. raw:: html
* - .. raw:: html
.. _ansible_collections.stephrobert.scaleway.compute_inventory__parameter-project_id: .. rst-class:: ansible-option-title **project_id** .. raw:: html .. ansible-option-type-line:: :ansible-option-type:`string` .. raw:: html
- .. raw:: html
Default Project ID. .. rst-class:: ansible-option-line :ansible-option-configuration:`Configuration:` - Environment variable: :envvar:`SCW\_DEFAULT\_PROJECT\_ID` .. raw:: html
* - .. raw:: html
.. _ansible_collections.stephrobert.scaleway.compute_inventory__parameter-projects: .. rst-class:: ansible-option-title **projects** .. raw:: html .. ansible-option-type-line:: :ansible-option-type:`list` / :ansible-option-elements:`elements=string` .. raw:: html
- .. raw:: html
Project IDs to restrict discovery to. Empty means the profile default. .. rst-class:: ansible-option-line :ansible-option-default-bold:`Default:` :ansible-option-default:`[]` .. raw:: html
* - .. raw:: html
.. _ansible_collections.stephrobert.scaleway.compute_inventory__parameter-regions: .. rst-class:: ansible-option-title **regions** .. raw:: html .. ansible-option-type-line:: :ansible-option-type:`list` / :ansible-option-elements:`elements=string` .. raw:: html
- .. raw:: html
Regions used to build the network index. Derived from the zones when empty. .. rst-class:: ansible-option-line :ansible-option-default-bold:`Default:` :ansible-option-default:`[]` .. raw:: html
* - .. raw:: html
.. _ansible_collections.stephrobert.scaleway.compute_inventory__parameter-require_address: .. rst-class:: ansible-option-title **require_address** .. raw:: html .. ansible-option-type-line:: :ansible-option-type:`boolean` .. raw:: html
- .. raw:: html
Drop hosts for which no address could be selected. False keeps them without :literal:`ansible\_host`\ , which is still useful for tasks delegated to localhost that act through the Scaleway API. .. rst-class:: ansible-option-line :ansible-option-choices:`Choices:` - :ansible-option-choices-entry-default:`false` :ansible-option-choices-default-mark:`← (default)` - :ansible-option-choices-entry:`true` .. raw:: html
* - .. raw:: html
.. _ansible_collections.stephrobert.scaleway.compute_inventory__parameter-secret_key: .. rst-class:: ansible-option-title **secret_key** .. raw:: html .. ansible-option-type-line:: :ansible-option-type:`string` .. raw:: html
- .. raw:: html
Scaleway API secret key. .. rst-class:: ansible-option-line :ansible-option-configuration:`Configuration:` - Environment variable: :envvar:`SCW\_SECRET\_KEY` .. raw:: html
* - .. raw:: html
.. _ansible_collections.stephrobert.scaleway.compute_inventory__parameter-states: .. rst-class:: ansible-option-title **states** .. raw:: html .. ansible-option-type-line:: :ansible-option-type:`list` / :ansible-option-elements:`elements=string` .. raw:: html
- .. raw:: html
Only keep hosts in these states. .. rst-class:: ansible-option-line :ansible-option-default-bold:`Default:` :ansible-option-default:`[]` .. raw:: html
* - .. raw:: html
.. _ansible_collections.stephrobert.scaleway.compute_inventory__parameter-strict: .. rst-class:: ansible-option-title **strict** .. raw:: html .. ansible-option-type-line:: :ansible-option-type:`boolean` .. raw:: html
- .. raw:: html
Fail the inventory when a provider fails, instead of returning an incomplete fleet. Refused credentials are fatal immediately; a product absent from a zone stays a warning, because that is not an outage. Ansible downgrades an inventory failure to a warning and exits zero, so on its own this option writes the reason and stops nothing. To make it stop a run, set :literal:`ANSIBLE\_INVENTORY\_ANY\_UNPARSED\_IS\_FAILED=True` in the environment, or :literal:`any\_unparsed\_is\_failed = True` under :literal:`[inventory]` in :literal:`ansible.cfg`. Without it, a revoked key produces a green run on an empty fleet. .. rst-class:: ansible-option-line :ansible-option-choices:`Choices:` - :ansible-option-choices-entry:`false` - :ansible-option-choices-entry-default:`true` :ansible-option-choices-default-mark:`← (default)` .. raw:: html
* - .. raw:: html
.. _ansible_collections.stephrobert.scaleway.compute_inventory__parameter-tags: .. rst-class:: ansible-option-title **tags** .. raw:: html .. ansible-option-type-line:: :ansible-option-type:`list` / :ansible-option-elements:`elements=string` .. raw:: html
- .. raw:: html
Only keep hosts carrying these tags. .. rst-class:: ansible-option-line :ansible-option-default-bold:`Default:` :ansible-option-default:`[]` .. raw:: html
* - .. raw:: html
.. _ansible_collections.stephrobert.scaleway.compute_inventory__parameter-tags_match: .. rst-class:: ansible-option-title **tags_match** .. raw:: html .. ansible-option-type-line:: :ansible-option-type:`string` .. raw:: html
- .. raw:: html
Whether a host must carry any or all of the requested tags. .. rst-class:: ansible-option-line :ansible-option-choices:`Choices:` - :ansible-option-choices-entry-default:`"any"` :ansible-option-choices-default-mark:`← (default)` - :ansible-option-choices-entry:`"all"` .. raw:: html
* - .. raw:: html
.. _ansible_collections.stephrobert.scaleway.compute_inventory__parameter-use_extra_vars: .. rst-class:: ansible-option-title **use_extra_vars** .. raw:: html .. ansible-option-type-line:: :ansible-option-type:`boolean` :ansible-option-versionadded:`added in ansible-core 2.11` .. raw:: html
- .. raw:: html
Merge extra vars into the available variables for composition (highest precedence). .. rst-class:: ansible-option-line :ansible-option-choices:`Choices:` - :ansible-option-choices-entry-default:`false` :ansible-option-choices-default-mark:`← (default)` - :ansible-option-choices-entry:`true` .. rst-class:: ansible-option-line :ansible-option-configuration:`Configuration:` - INI entry: .. code-block:: ini [inventory_plugins] use_extra_vars = false - Environment variable: :envvar:`ANSIBLE\_INVENTORY\_USE\_EXTRA\_VARS` .. raw:: html
* - .. raw:: html
.. _ansible_collections.stephrobert.scaleway.compute_inventory__parameter-user_agent: .. rst-class:: ansible-option-title **user_agent** .. raw:: html .. ansible-option-type-line:: :ansible-option-type:`string` .. raw:: html
- .. raw:: html
Value of the User\-Agent header sent to the API. .. raw:: html
* - .. raw:: html
.. _ansible_collections.stephrobert.scaleway.compute_inventory__parameter-zones: .. rst-class:: ansible-option-title **zones** .. raw:: html .. ansible-option-type-line:: :ansible-option-type:`list` / :ansible-option-elements:`elements=string` .. raw:: html
- .. raw:: html
Zones to query. Empty means every zone the product declares. .. rst-class:: ansible-option-line :ansible-option-default-bold:`Default:` :ansible-option-default:`[]` .. raw:: html
.. note:: Configuration entries listed above for each entry type (Ansible variable, environment variable, and so on) have a low to high priority order. For example, a variable that is lower in the list will override a variable that is higher up. The entry types are also ordered by precedence from low to high priority order. For example, an ansible.cfg entry (further up in the list) is overwritten by an Ansible variable (further down in the list). .. Attributes .. Notes Notes ----- .. note:: - The credential options are declared here rather than inherited from the module documentation fragment. A module option carries no :literal:`env` key, so its default would silently win over the environment, and a run meant for a local emulator would reach the real Scaleway API instead. - Inventories are not finalized at this stage, so the auto populated :literal:`all` and :literal:`ungrouped` groups will only reflect what previous inventory sources explicitly added to them. - Runtime 'magic variables' are not available during inventory construction. For example, :literal:`groups` and :literal:`hostvars` do not exist yet. .. Seealso .. Examples Examples -------- .. code-block:: yaml+jinja # Four inventory files, each complete and each meant to be copied whole. Save # one as `scaleway.yml` and run `ansible-inventory -i scaleway.yml --graph`. # 1. The smallest thing that works: the usual Scaleway profile decides the rest. plugin: stephrobert.scaleway.compute --- # 2. Production: one project, one region, the machines that are running. plugin: stephrobert.scaleway.compute projects: - 11111111-1111-1111-1111-111111111111 products: - instance regions: - fr-par states: - running tags: - production address_priority: - private_ipv4 - public_ipv4 group_by: - product - project - zone - tags cache: true --- # 3. Reach the machines over one named private network. Useful when a machine # sits on several: without this, the first one found wins, which is not a # decision. `require_address` then turns a machine with no address on that # network into an error rather than a silent absence from the inventory. plugin: stephrobert.scaleway.compute address: private_network: production require_address: true --- # 4. Groups and variables built by Ansible itself, from what the plugin # exposes. `scaleway_instance` carries the API object, so any of its fields can # key a group. plugin: stephrobert.scaleway.compute compose: ansible_user: "'ubuntu'" keyed_groups: - prefix: scw_type key: scaleway_instance.commercial_type .. Facts .. Return values .. Status (Presently only deprecated) .. Authors Authors ~~~~~~~ - Stéphane Robert (@stephrobert) .. 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