??????????????
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@`sddlmZmZmZeZidd6dgd6dd6ZdZd Zdd l Z dd l Z ydd l m Z e ZWnek reZnXywdd lZdd lmZdd lmZddlmZmZmZmZmZddlmZejZe Z Wnek r(eZ nXddl!m"Z"ddl#m$Z$m%Z%ddl&m'Z'ddl(m)Z)dZ*dZ+dZ,dZ-dddYZ.e/dkre-nd S(i(tabsolute_importtdivisiontprint_functions1.1tmetadata_versiont deprecatedtstatust communityt supported_bys --- module: gce version_added: "1.4" short_description: create or terminate GCE instances description: - Creates or terminates Google Compute Engine (GCE) instances. See U(https://cloud.google.com/compute) for an overview. Full install/configuration instructions for the gce* modules can be found in the comments of ansible/test/gce_tests.py. deprecated: removed_in: "2.12" why: Updated modules released with increased functionality alternative: Use M(gcp_compute_instance) instead. options: image: description: - image string to use for the instance (default will follow latest stable debian image) default: "debian-8" image_family: description: - image family from which to select the image. The most recent non-deprecated image in the family will be used. version_added: "2.4" external_projects: description: - A list of other projects (accessible with the provisioning credentials) to be searched for the image. version_added: "2.4" instance_names: description: - a comma-separated list of instance names to create or destroy machine_type: description: - machine type to use for the instance, use 'n1-standard-1' by default default: "n1-standard-1" metadata: description: - a hash/dictionary of custom data for the instance; '{"key":"value", ...}' service_account_email: version_added: "1.5.1" description: - service account email service_account_permissions: version_added: "2.0" description: - service account permissions (see U(https://cloud.google.com/sdk/gcloud/reference/compute/instances/create), --scopes section for detailed information) choices: [ "bigquery", "cloud-platform", "compute-ro", "compute-rw", "useraccounts-ro", "useraccounts-rw", "datastore", "logging-write", "monitoring", "sql-admin", "storage-full", "storage-ro", "storage-rw", "taskqueue", "userinfo-email" ] pem_file: version_added: "1.5.1" description: - path to the pem file associated with the service account email This option is deprecated. Use 'credentials_file'. credentials_file: version_added: "2.1.0" description: - path to the JSON file associated with the service account email project_id: version_added: "1.5.1" description: - your GCE project ID name: description: - either a name of a single instance or when used with 'num_instances', the base name of a cluster of nodes aliases: ['base_name'] num_instances: description: - can be used with 'name', specifies the number of nodes to provision using 'name' as a base name version_added: "2.3" network: description: - name of the network, 'default' will be used if not specified default: "default" subnetwork: description: - name of the subnetwork in which the instance should be created version_added: "2.2" persistent_boot_disk: description: - if set, create the instance with a persistent boot disk type: bool default: 'no' disks: description: - a list of persistent disks to attach to the instance; a string value gives the name of the disk; alternatively, a dictionary value can define 'name' and 'mode' ('READ_ONLY' or 'READ_WRITE'). The first entry will be the boot disk (which must be READ_WRITE). version_added: "1.7" state: description: - desired state of the resource default: "present" choices: ["active", "present", "absent", "deleted", "started", "stopped", "terminated"] tags: description: - a comma-separated list of tags to associate with the instance zone: description: - the GCE zone to use. The list of available zones is at U(https://cloud.google.com/compute/docs/regions-zones/regions-zones#available). required: true default: "us-central1-a" ip_forward: version_added: "1.9" description: - set to C(yes) if the instance can forward ip packets (useful for gateways) type: bool default: 'no' external_ip: version_added: "1.9" description: - type of external ip, ephemeral by default; alternatively, a fixed gce ip or ip name can be given. Specify 'none' if no external ip is desired. default: "ephemeral" disk_auto_delete: version_added: "1.9" description: - if set boot disk will be removed after instance destruction type: bool default: 'yes' preemptible: version_added: "2.1" description: - if set to C(yes), instances will be preemptible and time-limited. (requires libcloud >= 0.20.0) type: bool default: 'no' disk_size: description: - The size of the boot disk created for this instance (in GB) default: 10 version_added: "2.3" requirements: - "python >= 2.6" - "apache-libcloud >= 0.13.3, >= 0.17.0 if using JSON credentials, >= 0.20.0 if using preemptible option" notes: - Either I(instance_names) or I(name) is required. - JSON credentials strongly preferred. author: - Eric Johnson (@erjohnso) - Tom Melendez (@supertom) s # Basic provisioning example. Create a single Debian 8 instance in the # us-central1-a Zone of the n1-standard-1 machine type. # Create multiple instances by specifying multiple names, separated by # commas in the instance_names field # (e.g. my-test-instance1,my-test-instance2) - gce: instance_names: my-test-instance1 zone: us-central1-a machine_type: n1-standard-1 image: debian-8 state: present service_account_email: "your-sa@your-project-name.iam.gserviceaccount.com" credentials_file: "/path/to/your-key.json" project_id: "your-project-name" disk_size: 32 # Create a single instance of an image from the "my-base-image" image family # in the us-central1-a Zone of the n1-standard-1 machine type. # This image family is in the "my-other-project" GCP project. - gce: instance_names: my-test-instance1 zone: us-central1-a machine_type: n1-standard-1 image_family: my-base-image external_projects: - my-other-project state: present service_account_email: "your-sa@your-project-name.iam.gserviceaccount.com" credentials_file: "/path/to/your-key.json" project_id: "your-project-name" disk_size: 32 # Create a single Debian 8 instance in the us-central1-a Zone # Use existing disks, custom network/subnetwork, set service account permissions # add tags and metadata. - gce: instance_names: my-test-instance zone: us-central1-a machine_type: n1-standard-1 state: present metadata: '{"db":"postgres", "group":"qa", "id":500}' tags: - http-server - my-other-tag disks: - name: disk-2 mode: READ_WRITE - name: disk-3 mode: READ_ONLY disk_auto_delete: false network: foobar-network subnetwork: foobar-subnetwork-1 preemptible: true ip_forward: true service_account_permissions: - storage-full - taskqueue - bigquery - https://www.googleapis.com/auth/ndev.clouddns.readwrite service_account_email: "your-sa@your-project-name.iam.gserviceaccount.com" credentials_file: "/path/to/your-key.json" project_id: "your-project-name" --- # Example Playbook - name: Compute Engine Instance Examples hosts: localhost vars: service_account_email: "your-sa@your-project-name.iam.gserviceaccount.com" credentials_file: "/path/to/your-key.json" project_id: "your-project-name" tasks: - name: create multiple instances # Basic provisioning example. Create multiple Debian 8 instances in the # us-central1-a Zone of n1-standard-1 machine type. gce: instance_names: test1,test2,test3 zone: us-central1-a machine_type: n1-standard-1 image: debian-8 state: present service_account_email: "{{ service_account_email }}" credentials_file: "{{ credentials_file }}" project_id: "{{ project_id }}" metadata : '{ "startup-script" : "apt-get update" }' register: gce - name: Save host data add_host: hostname: "{{ item.public_ip }}" groupname: gce_instances_ips with_items: "{{ gce.instance_data }}" - name: Wait for SSH for instances wait_for: delay: 1 host: "{{ item.public_ip }}" port: 22 state: started timeout: 30 with_items: "{{ gce.instance_data }}" - name: Configure Hosts hosts: gce_instances_ips become: yes become_method: sudo roles: - my-role-one - my-role-two tags: - config - name: delete test-instances # Basic termination of instance. gce: service_account_email: "{{ service_account_email }}" credentials_file: "{{ credentials_file }}" project_id: "{{ project_id }}" instance_names: "{{ gce.instance_names }}" zone: us-central1-a state: absent tags: - delete N(t literal_eval(tProvider(t get_driver(tGoogleBaseErrortQuotaExceededErrortResourceExistsErrortResourceInUseErrortResourceNotFoundError(t GCEAddress(t AnsibleModule(t gce_connecttunexpected_error_msg(tget_valid_location(treducec C`s=i}d|jkrYd|jdkrYx.|jddD]}|d||d[stsourcetimaget machine_typetnamet private_ipt public_ipRttagstzoneN( textratsplitt ExceptiontNonetsortedtlent public_ipsR#tsizeR%t private_ips(tinstRtmdtnetnamet subnetnameR t disk_namesR'((sE/usr/lib/python2.7/site-packages/ansible/modules/cloud/google/_gce.pytget_instance_infoEsB"&  &  0  ,  ##c2C`s|jjd}|jjd}|jjd}|jjd}|jjd} |jjd} |jjd} |jjd} |jjd } |jjd }|jjd }|jjd }|jjd }|jjd}|jjd}|jjd}|dkr5dD}n|dkr|}yby8tj|tddddd|ddd|}Wn#tjk r|j|}nXWqtk r}|j dd||j fqXn|}g}t }g}g}xt | p gD]\}}t |tr\|j|j|d||j|dq|j|j|||j|dkrdndqW|j| }|j||}| rt | tr| }ny4tt| }t |ts tdnWnOtk r:}|j dd t|n#tk r\}|j dd!nXttd"rtjd#krg} x5|jD]'\}!}"| ji|!d$6|"d%6qWi| d&6} q|} nt||||d'|d(|}#g}$g}%|rx=|D]5}&|&|jkr |&jd) r |%j|&q q Wt|%dkrt|j dd*t|%n|$jid+d,6||$dd-kr|j dd?||.j*d>|/d=fq|/d||kr=|j dd@||||/dfqq=n|j+|-|.dA||t|-j*d |dBkr=|-j*d ji|.j*d>d=6|dC6q=q=Wq*Wg}g}0x8|D]0}-t,|-}1|j|1d|0j|1quW||0|fS(EsCreates new instances. Attributes other than instance_names are picked up from 'module' module : AnsibleModule object gce: authenticated GCE libcloud driver instance_names: python list of instance names to create number: number of instances to create lc_zone: GCEZone object Returns: A list of dictionaries with instance information about the instances that were launched. R#t image_familytexternal_projectsR$RRRtpersistent_boot_diskRR(t ip_forwardt external_iptdisk_auto_deletet preemptiblet disk_sizetservice_account_permissionstnonet ephemeraltidtunknownR%taddresstregiontdrivertmsgs<Unexpected error attempting to get a static ip %s, error: %stmodeit READ_ONLYt READ_WRITEsmetadata must be a dictsbad metadata: %ssbad metadata syntaxt __version__s0.15RRRtfamilytprojectsshttps://www.googleapis.com/authsbad permissions: %stdefaulttemailtscopess)Missing required create instance variabletchangedtlocationt ex_networktex_tagst ex_metadatatex_can_ip_forwardtex_disk_auto_deletetex_service_accountstex_preemptiblet ex_subnetworks%st ex_boot_disks&Unexpected error attempting to create sinstance %s, error: %sR"tselfLinks6Disk at index %d does not match: requested=%s found=%ss<Disk at index %d is in the wrong mode: requested=%s found=%stex_modeiRN(-tparamstgetR-tsockett inet_atonRterrortex_get_addressR t fail_jsonRtFalset enumeratet isinstancetdicttappendt ex_get_volumetex_get_networkt ex_get_sizeRtstrt ValueErrort SyntaxErrorthasattrtlibcloudRMRt LazyDiskImaget SA_SCOPES_MAPt startswithR/tex_create_multiple_nodestcomputetdriverstgcet GCEFailedNodet ex_get_nodeR%RtTruet create_volumet create_nodeR*t attach_volumeR8(2tmoduleRztinstance_namestnumbertlc_zoneR#R9R:R$RRRR;RR(R<R=R>R?R@RAtinstance_external_iptet new_instancesRStlc_diskst disk_modestitdiskt lc_networktlc_machine_typeR4Rtktvtlc_imaget ex_sa_permst bad_permstpermtgce_argstinstance_responsestresptntinstancetpdR3tlc_diskt attached_disktinstance_json_datatd((sE/usr/lib/python2.7/site-packages/ansible/modules/cloud/google/_gce.pytcreate_instancests    +$#  !               &        '  cC`st}g}g}t|trS|rSgt|D]} d|| f^q4} n(t|tru| ru|g} n|} x| D]} d } y|j| |} WnLtk r|j| qtk r} |j dt | dtqX|j| |j| qW|d krP|rP|j |p8tg}t d|}nx|D]}|d kr|j |t}qW|dkr|jtjjjjkr|j|t}qW|d krW|jtjjjjkrW|j|t}qWqWW||fS(sChanges the state of a list of instances. For example, change from started to stopped, or started to absent. module: Ansible module object gce: authenticated GCE connection object instance_names: a list of instance names to terminate zone: GCEZone object where the instances reside prior to termination state: 'state' parameter passed into module as argument Returns a dictionary of instance names that were changed. s%s-%03dRIRStabsenttdeletedcS`s |p |S(N((txty((sE/usr/lib/python2.7/site-packages/ansible/modules/cloud/google/_gce.pyR!^ststartedtstoppedt terminatedN(RR(RR(RR(RgRiRotrangeR-R|RRkR,RfRtex_destroy_multiple_nodesRt destroy_nodeR}tstateRsRxttypest NodeStatetSTOPPEDt ex_start_nodetRUNNINGt ex_stop_node(RRzRRR)RRStnodeststate_instance_namesRt node_namesR%R3Rt changed_nodestnode((sE/usr/lib/python2.7/site-packages/ansible/modules/cloud/google/_gce.pytchange_instance_state8s@ ,         '  '  c9C`stdtdtdddtdtddd td tdd d td tddgdtdddtdddtdtdddtdtdddtddddddddgddd tddd!tdd"d#td$tddd%tdd&d'tdd&d(td)tdddtd*tdd+d,tdddtd-tdddd.d/tddddd0d>g}ts|jd1d2nts|jd1d3nt|}|j j d}|j j d}|j j d}|j j d }|j j d }|j j d}|j j d}|j j d} |j j d!} |j j d/} t} d} t |t r|} n!t |t r|jd4} n|r|} n| s|jd1d5d6tn| s.|jd1d7d6tnt||| }| dk rttd8rtjd9kr|jd1d:d6tn|dk rt|d; r|jd1d<d6tni| d!6}| d?kr1| |dR@i R?tmutually_exclusiveRIs7GCE module requires python's 'ast' module, python v2.6+s<libcloud with GCE support (0.17.0+) required for this modulet,s)Must specify a "name" or "instance_names"RSsMust specify a "zone"RMs0.20s?Apache Libcloud 0.20.0+ is required to use 'preemptible' optiontex_get_subnetworks=Apache Libcloud 1.0.0+ is required to use 'subnetwork' optiont instance_data(RR%(sabsentsdeletedsstartedsstoppeds terminated(RR(RRjRgR}R-t HAS_PYTHON26Rft HAS_LIBCLOUDRR`RaRiRRoR+RRrRsRMRRt exit_json(RRzR#R9R:RR%RRRR)R?RStinamesRt json_outputRRtinstance_name_list((sE/usr/lib/python2.7/site-packages/ansible/modules/cloud/google/_gce.pytmainns            *           RtcB`s&eZdZdddZdZRS(s Object for lazy instantiation of disk image gce.ex_get_image is a very expensive call, so we want to avoid calling it as much as possible. cC`sLd|_t|_||_||_||_||_||_||_ dS(N( R-R#Rgt was_calledRzR%thas_pdRRNRO(tselfRRzR%RRNRO((sE/usr/lib/python2.7/site-packages/ansible/modules/cloud/google/_gce.pyt__init__s       cC`s|jst|_|js|jrH|jj|jd|j|_n!|jj|j d|j|_|js|j j dddt qqn|jS(Ntex_project_listRIs*image or disks missing for create instanceRS( RR}RRNRztex_get_image_from_familyROR#t ex_get_imageR%RRfRg(R((sE/usr/lib/python2.7/site-packages/ansible/modules/cloud/google/_gce.pyt__call__s    $! "N(t__name__t __module__t__doc__R-RR(((sE/usr/lib/python2.7/site-packages/ansible/modules/cloud/google/_gce.pyRts t__main__((0t __future__RRRRt __metaclass__tANSIBLE_METADATAt DOCUMENTATIONtEXAMPLESRbtloggingtastRR}Rt ImportErrorRgRstlibcloud.compute.typesR tlibcloud.compute.providersR tlibcloud.common.googleR R R RRtlibcloud.compute.drivers.gceRtGCEt_Rtansible.module_utils.basicRtansible.module_utils.gceRRtansible.module_utils.gcpRtansible.module_utils.six.movesRR8RRRRtR(((sE/usr/lib/python2.7/site-packages/ansible/modules/cloud/google/_gce.pytsD   ~      (     / 6 f