community.general.online 库存 – Scaleway (前身为 Online SAS 或 Online.net) 库存源

注意

此库存插件是 community.general 集合(版本 10.1.0)的一部分。

如果您正在使用 ansible 包,您可能已经安装了此集合。它不包含在 ansible-core 中。要检查是否已安装,请运行 ansible-galaxy collection list

要安装它,请使用:ansible-galaxy collection install community.general

要在 playbook 中使用它,请指定:community.general.online

概要

  • 从 Scaleway(前身为 Online SAS 或 Online.net)获取库存主机。

参数

参数

注释

groups

列表 / 元素=字符串

组列表。

选项

  • "location"

  • "offer"

  • "rpn"

hostnames

列表 / 元素=字符串

关于使用什么作为主机名的偏好列表。

选项

  • "public_ipv4" ← (默认)

  • "private_ipv4"

  • "hostname"

默认: ["public_ipv4"]

oauth_token

字符串 / 必需

Online OAuth 令牌。

配置

plugin

字符串 / 必需

确保这是 'online' 插件的源文件的令牌。

选项

  • "online"

  • "community.general.online"

示例

# online_inventory.yml file in YAML format
# Example command line: ansible-inventory --list -i online_inventory.yml

plugin: community.general.online
hostnames:
  - public_ipv4
groups:
  - location
  - offer
  - rpn

作者

  • Remy Leone (@remyleone)

提示

每个条目类型的配置条目都具有从低到高的优先级顺序。例如,列表中较低的变量将覆盖较高的变量。