Server IP : 85.193.89.191 / Your IP : 18.191.174.159 Web Server : Apache System : Linux 956367-cx40159.tmweb.ru 3.10.0-1160.105.1.el7.x86_64 #1 SMP Thu Dec 7 15:39:45 UTC 2023 x86_64 User : bitrix ( 600) PHP Version : 8.1.27 Disable Function : NONE MySQL : OFF | cURL : OFF | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /lib/python2.7/site-packages/ansible/plugins/inventory/ |
Upload File : |
� � �\c @` s� d d l m Z m Z m Z e Z d Z d Z d d l Z d d l Z d d l m Z d d l m Z m Z m Z yC d d l Z e j d � Z e j d � Z e j d � Z e Z Wn e k r� e Z n Xd e e e f d � � YZ d S( i ( t absolute_importt divisiont print_functions� name: openstack plugin_type: inventory author: - Marco Vito Moscaritolo <marco@agavee.com> - Jesse Keating <jesse.keating@rackspace.com> short_description: OpenStack inventory source requirements: - openstacksdk extends_documentation_fragment: - inventory_cache - constructed description: - Get inventory hosts from OpenStack clouds - Uses openstack.(yml|yaml) YAML configuration file to configure the inventory plugin - Uses standard clouds.yaml YAML configuration file to configure cloud credentials options: plugin: description: token that ensures this is a source file for the 'openstack' plugin. required: True choices: ['openstack'] show_all: description: toggles showing all vms vs only those with a working IP type: bool default: 'no' inventory_hostname: description: | What to register as the inventory hostname. If set to 'uuid' the uuid of the server will be used and a group will be created for the server name. If set to 'name' the name of the server will be used unless there are more than one server with the same name in which case the 'uuid' logic will be used. Default is to do 'name', which is the opposite of the old openstack.py inventory script's option use_hostnames) type: string choices: - name - uuid default: "name" expand_hostvars: description: | Run extra commands on each host to fill in additional information about the host. May interrogate cinder and neutron and can be expensive for people with many hosts. (Note, the default value of this is opposite from the default old openstack.py inventory script's option expand_hostvars) type: bool default: 'no' private: description: | Use the private interface of each server, if it has one, as the host's IP in the inventory. This can be useful if you are running ansible inside a server in the cloud and would rather communicate to your servers over the private network. type: bool default: 'no' only_clouds: description: | List of clouds from clouds.yaml to use, instead of using the whole list. type: list default: [] fail_on_errors: description: | Causes the inventory to fail and return no hosts if one cloud has failed (for example, bad credentials or being offline). When set to False, the inventory will return as many hosts as it can from as many clouds as it can contact. (Note, the default value of this is opposite from the old openstack.py inventory script's option fail_on_errors) type: bool default: 'no' clouds_yaml_path: description: | Override path to clouds.yaml file. If this value is given it will be searched first. The default path for the ansible inventory adds /etc/ansible/openstack.yaml and /etc/ansible/openstack.yml to the regular locations documented at https://docs.openstack.org/os-client-config/latest/user/configuration.html#config-files type: string compose: description: Create vars from jinja2 expressions. type: dictionary default: {} groups: description: Add hosts to group based on Jinja2 conditionals. type: dictionary default: {} s� # file must be named openstack.yaml or openstack.yml # Make the plugin behave like the default behavior of the old script plugin: openstack expand_hostvars: yes fail_on_errors: yes N( t AnsibleParserError( t BaseInventoryPlugint Constructablet Cacheablet openstacks openstack.cloud.inventorys openstack.config.loadert InventoryModulec B` sS e Z d Z d Z e d � Z d � Z d � Z e d � Z e d � Z d � Z RS( s= Host inventory provider for ansible using OpenStack clouds. R c C` s� t t | � j | | | � | j | � } | j | � | _ d } | j sU d } no d | j k r� | j d | j k r� d | j d } n6 d | j k r� d | j k r� d } n t s� d } n | r� t | � � n d | j k r� i | _ n | r| j d � } n d } | rEy | j j | � } WqEt k rAqEXn | s�| j j d � } | rs| t j } n d } t j d t j � t j d | d | j j d t � � } | j j d g � } | r�t | t � r�t d � � n | r8g } x0 | j D]% } | j | k r| j | � qqW| | _ n | j j d t � } | j j d t � } | j d | d | � } | j d k r�| j j | | � q�n | j | � d S( Nt s&