1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00
community.general/contrib/inventory/scaleway.ini
Paul B ccdc93ab59 contrib(inventory): fix Scaleway inventory used w/env variable token (#35701)
In order to authenticate with the Scaleway API for the contrib dynamic
inventory Scaleway the environment variable SCALEWAY_TOKEN was read
only if a value was set in the configuration .ini file.

This PR fixes that allowing to read only the environment variable
without needing to set a token in the configuration file.

Closes #35693
2018-02-05 08:32:49 +00:00

37 lines
1,018 B
INI

# Ansible dynamic inventory script for Scaleway cloud provider
#
[compute]
# Fetch inventory for regions. If not defined will read the SCALEWAY_REGION environment variable
#
# regions = all
# regions = ams1
# regions = par1, ams1
regions = par1
# Define a Scaleway token to perform required queries on the API
# in order to generate inventory output.
#
[auth]
# Token to authenticate with Scaleway's API.
# If not defined will read the SCALEWAY_TOKEN environment variable
#
api_token = mysecrettoken
# To avoid performing excessive calls to Scaleway API you can define a
# cache for the plugin output. Within the time defined in seconds, latest
# output will be reused. After that time, the cache will be refreshed.
#
[cache]
cache_max_age = 60
cache_dir = '~/.ansible/tmp'
[defaults]
# You may want to use only public IP addresses or private IP addresses.
# You can set public_ip_only configuration to get public IPs only.
# If not defined defaults to retrieving private IP addresses.
#
public_ip_only = false