Server IP : 85.193.89.191 / Your IP : 3.149.214.245 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 m Z m Z d d l m Z m Z d d l m Z d d l m Z m Z m Z d d l m Z m Z m Z m Z d d l Z d e f d � � YZ d e e e f d � � YZ d S( i ( t absolute_importt divisiont print_functions� name: gcp_compute plugin_type: inventory short_description: Google Cloud Compute Engine inventory source requirements: - requests >= 2.18.4 - google-auth >= 1.3.0 extends_documentation_fragment: - constructed - inventory_cache description: - Get inventory hosts from Google Cloud Platform GCE. - Uses a YAML configuration file that ends with gcp_compute.(yml|yaml) or gcp.(yml|yaml). options: plugin: description: token that ensures this is a source file for the 'gcp_compute' plugin. required: True choices: ['gcp_compute'] zones: description: A list of regions in which to describe GCE instances. default: all zones available to a given project projects: description: A list of projects in which to describe GCE instances. filters: description: > A list of filter value pairs. Available filters are listed here U(https://cloud.google.com/compute/docs/reference/rest/v1/instances/list). Each additional filter in the list will act be added as an AND condition (filter1 and filter2) hostnames: description: A list of options that describe the ordering for which hostnames should be assigned. Currently supported hostnames are 'public_ip', 'private_ip', or 'name'. default: ['public_ip', 'private_ip', 'name'] auth_kind: description: - The type of credential used. service_account_file: description: - The path of a Service Account JSON file if serviceaccount is selected as type. service_account_email: description: - An optional service account email address if machineaccount is selected and the user does not wish to use the default email. s plugin: gcp_compute zones: # populate inventory with instances in these regions - us-east1-a projects: - gcp-prod-gke-100 - gcp-cicd-101 filters: - machineType = n1-standard-1 - scheduling.automaticRestart = true AND machineType = n1-standard-1 scopes: - https://www.googleapis.com/auth/compute service_account_file: /tmp/service_account.json auth_kind: serviceaccount ( t AnsibleErrort AnsibleParserError( t to_nativet to_text( t string_types( t GcpSessiont navigate_hasht GcpRequestException( t BaseInventoryPlugint Constructablet Cacheablet to_safe_group_nameNt GcpMockModulec B` s e Z d � Z d � Z RS( c C` s | | _ d S( N( t params( t selfR ( ( sI /usr/lib/python2.7/site-packages/ansible/plugins/inventory/gcp_compute.pyt __init__Q s c O` s t | d � � d S( Nt msg( R ( R t argst kwargs( ( sI /usr/lib/python2.7/site-packages/ansible/plugins/inventory/gcp_compute.pyt fail_jsonT s ( t __name__t __module__R R ( ( ( sI /usr/lib/python2.7/site-packages/ansible/plugins/inventory/gcp_compute.pyR P s t 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 e d � Z d � Z d � Z d � Z d � Z e d � Z RS( t gcp_computec C` s t t | � j � d | _ d S( Nt gcp_( t superR R t group_prefix( R ( ( sI /usr/lib/python2.7/site-packages/ansible/plugins/inventory/gcp_compute.pyR \ s c C` sa | j | � } | j j | � x( | D] } | j j | | | | � q&