ansible/docs/docsite/rst/scenario_guides/guide_online.rst
Alicia Cozine a4d0bc2c43
Shortens Scenario Guides, incorporates vmware guide (#54554)
* Shortens Scenario Guides, incorporates vmware guide

* adds links from network scenario guides to other network docs
2019-04-04 11:58:30 -05:00

1.2 KiB

Online.net Guide

Introduction

Online is a French hosting company mainly known for providing bare-metal servers named Dedibox. Check it out: https://www.online.net/en

Dynamic inventory for Online resources

Ansible has a dynamic inventory plugin that can list your resources.

  1. Create a YAML configuration such as online_inventory.yml with this content:
plugin: online
  1. Set your ONLINE_TOKEN environment variable with your token.

    You need to open an account and log into it before you can get a token. You can find your token at the following page: https://console.online.net/en/api/access

  2. You can test that your inventory is working by running:
$ ansible-inventory -v -i online_inventory.yml --list
  1. Now you can run your playbook or any other module with this inventory:
$ ansible all -i online_inventory.yml -m ping
sd-96735 | SUCCESS => {
    "changed": false,
    "ping": "pong"
}