Server IP : 85.193.89.191 / Your IP : 13.58.193.140 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 Z d d l m Z d d l m Z m Z m Z m Z m Z d d l m Z d d l m Z d d l m Z y d d l m Z Wn! e k r� d d l m Z n Xd e f d � � YZ d S( i ( t absolute_importt divisiont print_functions� name: tower plugin_type: inventory author: - Matthew Jones (@matburt) - Yunfan Zhang (@YunfanZhang42) short_description: Ansible dynamic inventory plugin for Ansible Tower. version_added: "2.7" description: - Reads inventories from Ansible Tower. - Supports reading configuration from both YAML config file and environment variables. - If reading from the YAML file, the file name must end with tower.(yml|yaml) or tower_inventory.(yml|yaml), the path in the command would be /path/to/tower_inventory.(yml|yaml). If some arguments in the config file are missing, this plugin will try to fill in missing arguments by reading from environment variables. - If reading configurations from environment variables, the path in the command must be @tower_inventory. options: plugin: description: the name of this plugin, it should always be set to 'tower' for this plugin to recognize it as it's own. env: - name: ANSIBLE_INVENTORY_ENABLED required: True choices: ['tower'] host: description: The network address of your Ansible Tower host. type: string env: - name: TOWER_HOST required: True username: description: The user that you plan to use to access inventories on Ansible Tower. type: string env: - name: TOWER_USERNAME required: True password: description: The password for your Ansible Tower user. type: string env: - name: TOWER_PASSWORD required: True inventory_id: description: The ID of the Ansible Tower inventory that you wish to import. type: string env: - name: TOWER_INVENTORY required: True verify_ssl: description: Specify whether Ansible should verify the SSL certificate of Ansible Tower host. type: bool default: True env: - name: TOWER_VERIFY_SSL required: False sA # Before you execute the following commands, you should make sure this file is in your plugin path, # and you enabled this plugin. # Example for using tower_inventory.yml file plugin: tower host: your_ansible_tower_server_network_address username: your_ansible_tower_username password: your_ansible_tower_password inventory_id: the_ID_of_targeted_ansible_tower_inventory # Then you can run the following command. # If some of the arguments are missing, Ansible will attempt to read them from environment variables. # ansible-inventory -i /path/to/tower_inventory.yml --list # Example for reading from environment variables: # Set environment variables: # export TOWER_HOST=YOUR_TOWER_HOST_ADDRESS # export TOWER_USERNAME=YOUR_TOWER_USERNAME # export TOWER_PASSWORD=YOUR_TOWER_PASSWORD # export TOWER_INVENTORY=THE_ID_OF_TARGETED_INVENTORY # Read the inventory specified in TOWER_INVENTORY from Ansible Tower, and list them. # The inventory path must always be @tower_inventory if you are reading all settings from environment variables. # ansible-inventory -i @tower_inventory --list N( t six( t Requestt urllib_errort ConnectionErrort sockett httplib( t to_native( t AnsibleParserError( t BaseInventoryPlugin( t urljoint InventoryModulec B` s5 e Z d Z e Z e d � Z d � Z e d � Z RS( t towerc C` si t j d | � s'