??????????????
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 173
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 174
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 175
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 176
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 177
Warning: Cannot modify header information - headers already sent by (output started at /home/mybf1/public_html/mentol.bf1.my/SS1.php:4) in /home/mybf1/public_html/mentol.bf1.my/SS1.php on line 178
๓
เUdac @` sั d d l m Z m Z m Z e Z d Z d Z d d l Z d d l m
Z
d d l m Z d d l
m Z m Z d d l m Z y d d l m Z Wn e k
rณ e
d
n Xd e e f d YZ d S(
i ( t absolute_importt divisiont print_functionsา
name: hcloud
plugin_type: inventory
author:
- Lukas Kaemmerling (@lkaemmerling)
short_description: Ansible dynamic inventory plugin for the Hetzner Cloud.
version_added: "2.8"
requirements:
- python >= 2.7
- hcloud-python >= 1.0.0
description:
- Reads inventories from the Hetzner Cloud API.
- Uses a YAML configuration file that ends with hcloud.(yml|yaml).
extends_documentation_fragment:
- constructed
options:
plugin:
description: marks this as an instance of the "hcloud" plugin
required: true
choices: ["hcloud"]
token:
description: The Hetzner Cloud API Token.
required: true
env:
- name: HCLOUD_TOKEN
connect_with:
description: Connect to the server using the value from this field.
default: public_ipv4
type: str
choices:
- public_ipv4
- hostname
- ipv4_dns_ptr
locations:
description: Populate inventory with instances in this location.
default: []
type: list
required: false
types:
description: Populate inventory with instances with this type.
default: []
type: list
required: false
images:
description: Populate inventory with instances with this image name, only available for system images.
default: []
type: list
required: false
label_selector:
description: Populate inventory with instances with this label.
default: ""
type: str
required: false
s
# Minimal example. `HCLOUD_TOKEN` is exposed in environment.
plugin: hcloud
# Example with locations, types, groups and token
plugin: hcloud
token: foobar
locations:
- nbg1
types:
- cx11
# Group by a location with prefix e.g. "hcloud_location_nbg1"
# and image_os_flavor without prefix and separator e.g. "ubuntu"
# and status with prefix e.g. "server_status_running"
plugin: hcloud
keyed_groups:
- key: location
prefix: hcloud_location
- key: image_os_flavor
separator: ""
- key: status
prefix: server_status
N( t AnsibleError( t to_native( t BaseInventoryPlugint
Constructable( t __version__( t hcloudsB The Hetzner Cloud dynamic inventory plugin requires hcloud-python.t InventoryModulec B` sP e Z d Z d Z d Z d Z d Z d Z d Z e d Z
RS( R c
C` sy | j d | _ | j d k r0 t d n t j d pB d | _ t j d | j d | j d d d t | _
d S( Nt tokensU Please specify a token, via the option token or via environment variable HCLOUD_TOKENt HCLOUD_ENDPOINTs https://api.hetzner.cloud/v1t api_endpointt application_names ansible-inventoryt application_version( t
get_optiont api_tokent NoneR t ost getenvt endpointR t ClientR t client( t self( ( sD /usr/lib/python2.7/site-packages/ansible/plugins/inventory/hcloud.pyt _configure_hcloud_clientg s c C` s; y | j j j Wn t j k
r6 t d n Xd S( Ns Invalid Hetzner Cloud API Token.( R t locationst get_allR t APIExceptionR ( R ( ( sD /usr/lib/python2.7/site-packages/ansible/plugins/inventory/hcloud.pyt _test_hcloud_tokent s c C` s[ t | j d d k rB | j j j d | j d | _ n | j j j | _ d S( Nt label_selectori ( t lenR R t serversR ( R ( ( sD /usr/lib/python2.7/site-packages/ansible/plugins/inventory/hcloud.pyt _get_servers| s 'c C` s6 | j d rc g } x? | j D]4 } | j j j | j d k r | j | q q W| | _ n | j d rร g } x<