Class: Ansible::Ruby::Modules::Gce

Inherits:
Base show all
Defined in:
lib/ansible/ruby/modules/generated/cloud/google/gce.rb

Overview

Creates or terminates Google Compute Engine (GCE) instances. See U(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.

Instance Method Summary collapse

Methods inherited from Base

#ansible_name, #to_h

Methods inherited from Ansible::Ruby::Models::Base

attr_option, attr_options, attribute, fix_inclusion, #initialize, remove_existing_validations, #to_h, validates

Constructor Details

This class inherits a constructor from Ansible::Ruby::Models::Base

Instance Method Details

#credentials_fileString?

Returns path to the JSON file associated with the service account email.

Returns:

  • (String, nil)

    path to the JSON file associated with the service account email



47
# File 'lib/ansible/ruby/modules/generated/cloud/google/gce.rb', line 47

attribute :credentials_file

#disk_auto_delete:yes, ...

Returns if set boot disk will be removed after instance destruction.

Returns:

  • (:yes, :no, nil)

    if set boot disk will be removed after instance destruction



97
# File 'lib/ansible/ruby/modules/generated/cloud/google/gce.rb', line 97

attribute :disk_auto_delete

#disk_sizeInteger?

Returns The size of the boot disk created for this instance (in GB).

Returns:

  • (Integer, nil)

    The size of the boot disk created for this instance (in GB)



105
# File 'lib/ansible/ruby/modules/generated/cloud/google/gce.rb', line 105

attribute :disk_size

#disksArray<Hash>, ...

Returns 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).

Returns:

  • (Array<Hash>, Hash, nil)

    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).



73
# File 'lib/ansible/ruby/modules/generated/cloud/google/gce.rb', line 73

attribute :disks

#external_ipString?

Returns 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.

Returns:

  • (String, nil)

    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.



93
# File 'lib/ansible/ruby/modules/generated/cloud/google/gce.rb', line 93

attribute :external_ip

#external_projectsArray<String>, ...

Returns A list of other projects (accessible with the provisioning credentials) to be searched for the image.

Returns:

  • (Array<String>, String, nil)

    A list of other projects (accessible with the provisioning credentials) to be searched for the image.



20
# File 'lib/ansible/ruby/modules/generated/cloud/google/gce.rb', line 20

attribute :external_projects

#imageString?

Returns image string to use for the instance (default will follow latest stable debian image).

Returns:

  • (String, nil)

    image string to use for the instance (default will follow latest stable debian image)



12
# File 'lib/ansible/ruby/modules/generated/cloud/google/gce.rb', line 12

attribute :image

#image_familyString?

Returns image family from which to select the image. The most recent non-deprecated image in the family will be used.

Returns:

  • (String, nil)

    image family from which to select the image. The most recent non-deprecated image in the family will be used.



16
# File 'lib/ansible/ruby/modules/generated/cloud/google/gce.rb', line 16

attribute :image_family

#instance_namesString?

Returns a comma-separated list of instance names to create or destroy.

Returns:

  • (String, nil)

    a comma-separated list of instance names to create or destroy



24
# File 'lib/ansible/ruby/modules/generated/cloud/google/gce.rb', line 24

attribute :instance_names

#ip_forward:yes, ...

Returns set to C(yes) if the instance can forward ip packets (useful for gateways).

Returns:

  • (:yes, :no, nil)

    set to C(yes) if the instance can forward ip packets (useful for gateways)



89
# File 'lib/ansible/ruby/modules/generated/cloud/google/gce.rb', line 89

attribute :ip_forward

#machine_typeString?

Returns machine type to use for the instance, use ‘n1-standard-1’ by default.

Returns:

  • (String, nil)

    machine type to use for the instance, use ‘n1-standard-1’ by default



28
# File 'lib/ansible/ruby/modules/generated/cloud/google/gce.rb', line 28

attribute :machine_type

#metadataHash?

Returns a hash/dictionary of custom data for the instance; ‘…’.

Returns:

  • (Hash, nil)

    a hash/dictionary of custom data for the instance; ‘…’



32
# File 'lib/ansible/ruby/modules/generated/cloud/google/gce.rb', line 32

attribute :metadata

#nameObject?

Returns either a name of a single instance or when used with ‘num_instances’, the base name of a cluster of nodes.

Returns:

  • (Object, nil)

    either a name of a single instance or when used with ‘num_instances’, the base name of a cluster of nodes



55
# File 'lib/ansible/ruby/modules/generated/cloud/google/gce.rb', line 55

attribute :name

#networkString?

Returns name of the network, ‘default’ will be used if not specified.

Returns:

  • (String, nil)

    name of the network, ‘default’ will be used if not specified



61
# File 'lib/ansible/ruby/modules/generated/cloud/google/gce.rb', line 61

attribute :network

#num_instancesObject?

Returns can be used with ‘name’, specifies the number of nodes to provision using ‘name’ as a base name.

Returns:

  • (Object, nil)

    can be used with ‘name’, specifies the number of nodes to provision using ‘name’ as a base name



58
# File 'lib/ansible/ruby/modules/generated/cloud/google/gce.rb', line 58

attribute :num_instances

#pem_fileObject?

Returns path to the pem file associated with the service account email This option is deprecated. Use ‘credentials_file’.

Returns:

  • (Object, nil)

    path to the pem file associated with the service account email This option is deprecated. Use ‘credentials_file’.



44
# File 'lib/ansible/ruby/modules/generated/cloud/google/gce.rb', line 44

attribute :pem_file

#persistent_boot_disk:yes, ...

Returns if set, create the instance with a persistent boot disk.

Returns:

  • (:yes, :no, nil)

    if set, create the instance with a persistent boot disk



69
# File 'lib/ansible/ruby/modules/generated/cloud/google/gce.rb', line 69

attribute :persistent_boot_disk

#preemptible:yes, ...

Returns if set to C(yes), instances will be preemptible and time-limited. (requires libcloud >= 0.20.0).

Returns:

  • (:yes, :no, nil)

    if set to C(yes), instances will be preemptible and time-limited. (requires libcloud >= 0.20.0)



101
# File 'lib/ansible/ruby/modules/generated/cloud/google/gce.rb', line 101

attribute :preemptible

#project_idString?

Returns your GCE project ID.

Returns:

  • (String, nil)

    your GCE project ID



51
# File 'lib/ansible/ruby/modules/generated/cloud/google/gce.rb', line 51

attribute :project_id

#service_account_emailString?

Returns service account email.

Returns:

  • (String, nil)

    service account email



36
# File 'lib/ansible/ruby/modules/generated/cloud/google/gce.rb', line 36

attribute :service_account_email

#service_account_permissions:bigquery, ...

Returns service account permissions (see U(cloud.google.com/sdk/gcloud/reference/compute/instances/create), –scopes section for detailed information).

Returns:

  • (: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", nil)

    service account permissions (see U(cloud.google.com/sdk/gcloud/reference/compute/instances/create), –scopes section for detailed information)



40
# File 'lib/ansible/ruby/modules/generated/cloud/google/gce.rb', line 40

attribute :service_account_permissions

#state:active, ...

Returns desired state of the resource.

Returns:

  • (:active, :present, :absent, :deleted, :started, :stopped, :terminated, nil)

    desired state of the resource



77
# File 'lib/ansible/ruby/modules/generated/cloud/google/gce.rb', line 77

attribute :state

#subnetworkString?

Returns name of the subnetwork in which the instance should be created.

Returns:

  • (String, nil)

    name of the subnetwork in which the instance should be created



65
# File 'lib/ansible/ruby/modules/generated/cloud/google/gce.rb', line 65

attribute :subnetwork

#tagsArray<String>, ...

Returns a comma-separated list of tags to associate with the instance.

Returns:

  • (Array<String>, String, nil)

    a comma-separated list of tags to associate with the instance



81
# File 'lib/ansible/ruby/modules/generated/cloud/google/gce.rb', line 81

attribute :tags

#zoneString

Returns the GCE zone to use. The list of available zones is at U(cloud.google.com/compute/docs/regions-zones/regions-zones#available).

Returns:



85
# File 'lib/ansible/ruby/modules/generated/cloud/google/gce.rb', line 85

attribute :zone