??????????????
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 d d l m Z d d l m Z m Z d d
l m Z d d l m Z d e f d
YZ d S( i ( t absolute_importt divisiont print_functionsG
name: online
plugin_type: inventory
author:
- Remy Leone (@sieben)
short_description: Online inventory source
description:
- Get inventory hosts from Online
options:
plugin:
description: token that ensures this is a source file for the 'online' plugin.
required: True
choices: ['online']
oauth_token:
required: True
description: Online OAuth token.
env:
# in order of precedence
- name: ONLINE_TOKEN
- name: ONLINE_API_KEY
- name: ONLINE_OAUTH_TOKEN
hostnames:
description: List of preference about what to use as an hostname.
type: list
default:
- public_ipv4
choices:
- public_ipv4
- private_ipv4
- hostname
groups:
description: List of groups.
type: list
choices:
- location
- offer
- rpn
sΗ
# online_inventory.yml file in YAML format
# Example command line: ansible-inventory --list -i online_inventory.yml
plugin: online
hostnames:
- public_ipv4
groups:
- location
- offer
- rpn
N( t version( t AnsibleError( t open_url( t BaseInventoryPlugin( t to_nativet to_text( t __version__( t urljoint InventoryModulec B` s e Z d Z d Z d Z d Z d Z d Z d Z d Z d Z
d Z d
Z e
d Z d Z d
Z d Z e d Z RS( t onlines https://api.online.netc C` sF y | d d d SWn+ t t t f k
rA | j j d d SXd S( Nt networkt ipi sL An error happened while extracting public IPv4 address. Information skipped.( t KeyErrort TypeErrort
IndexErrort displayt warningt None( t selft
host_infos( ( sD /usr/lib/python2.7/site-packages/ansible/plugins/inventory/online.pyt extract_public_ipv4L s
c C` sF y | d d d SWn+ t t t f k
rA | j j d d SXd S( NR
t privatei sM An error happened while extracting private IPv4 address. Information skipped.( R R R R R R ( R R ( ( sD /usr/lib/python2.7/site-packages/ansible/plugins/inventory/online.pyt extract_private_ipv4S s
c C` s? y | d d SWn( t t f k
r: | j j d d SXd S( Nt ost names@ An error happened while extracting OS name. Information skipped.( R R R R R ( R R ( ( sD /usr/lib/python2.7/site-packages/ansible/plugins/inventory/online.pyt extract_os_nameZ s
c C` s? y | d d SWn( t t f k
r: | j j d d SXd S( NR R sC An error happened while extracting OS version. Information skipped.( R R R R R ( R R ( ( sD /usr/lib/python2.7/site-packages/ansible/plugins/inventory/online.pyt extract_os_versiona s
c C` s; y | d SWn( t t f k
r6 | j j d d SXd S( Nt hostnamesA An error happened while extracting hostname. Information skipped.( R R R R R ( R R ( ( sD /usr/lib/python2.7/site-packages/ansible/plugins/inventory/online.pyt extract_hostnameh s
c C` s? y | d d SWn( t t f k
r: | j j d d SXd S( Nt locationt
datacentersL An error happened while extracting datacenter location. Information skipped.( R R R R R ( R R ( ( sD /usr/lib/python2.7/site-packages/ansible/plugins/inventory/online.pyt extract_locationo s
c C` s; y | d SWn( t t f k
r6 | j j d d SXd S( Nt offersI An error happened while extracting commercial offer. Information skipped.( R R R R R ( R R ( ( sD /usr/lib/python2.7/site-packages/ansible/plugins/inventory/online.pyt
extract_offerv s
c C` sB y | j | d SWn( t t f k
r= | j j d d SXd S( Nt idsH An error happened while extracting RPN information. Information skipped.( t rpn_lookup_cacheR R R R R ( R R ( ( sD /usr/lib/python2.7/site-packages/ansible/plugins/inventory/online.pyt extract_rpn} s
c C` s΅ y t | d | j } Wn( t k
rC } | j j d | d SXy t | j d d } Wn t k
r t d n Xy t
j | SWn t k
r° t d n Xd S( Nt headerss$ An error happened while fetching: %st errorst surrogate_or_stricts9 Incorrect encoding of fetched payload from Online serverss Incorrect JSON payload(
R R( t ExceptionR R R R t readt UnicodeErrorR t jsont loadst
ValueError( R t urlt responset et raw_data( ( sD /usr/lib/python2.7/site-packages/ansible/plugins/inventory/online.pyt _fetch_information s
c C` sB i } x5 | D]- } x$ | d D] } | d | | d