Class: Ansible::Ruby::Modules::Packet_device

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

Overview

Manage a bare metal server in the Packet Host (a “device” in the API terms). When the machine is created it can optionally wait for public IP address, or for active state. This module has a dependency on packet >= 1.0. API is documented at U(www.packet.net/developers/api/devices).

Instance Method Summary collapse

Methods inherited from Base

#ansible_name, #to_h

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

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

Constructor Details

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

Instance Method Details

#always_pxeBoolean?

Returns Persist PXE as the first boot option.,Normally, the PXE process happens only on the first boot. Set this arg to have your device continuously boot to iPXE.

Returns:

  • (Boolean, nil)

    Persist PXE as the first boot option.,Normally, the PXE process happens only on the first boot. Set this arg to have your device continuously boot to iPXE.



70
# File 'lib/ansible/ruby/modules/generated/cloud/packet/packet_device.rb', line 70

attribute :always_pxe

#auth_tokenObject?

Returns Packet api token. You can also supply it in env var C(PACKET_API_TOKEN).

Returns:

  • (Object, nil)

    Packet api token. You can also supply it in env var C(PACKET_API_TOKEN).



15
# File 'lib/ansible/ruby/modules/generated/cloud/packet/packet_device.rb', line 15

attribute :auth_token

#countInteger?

Returns The number of devices to create. Count number can be included in hostname via the %d string formatter.

Returns:

  • (Integer, nil)

    The number of devices to create. Count number can be included in hostname via the %d string formatter.



18
# File 'lib/ansible/ruby/modules/generated/cloud/packet/packet_device.rb', line 18

attribute :count

#count_offsetInteger?

Returns From which number to start the count.

Returns:

  • (Integer, nil)

    From which number to start the count.



22
# File 'lib/ansible/ruby/modules/generated/cloud/packet/packet_device.rb', line 22

attribute :count_offset

#device_idsObject?

Returns List of device IDs on which to operate.

Returns:

  • (Object, nil)

    List of device IDs on which to operate.



26
# File 'lib/ansible/ruby/modules/generated/cloud/packet/packet_device.rb', line 26

attribute :device_ids

#facilityObject?

Returns Facility slug for device creation. See Packet API for current list - U(www.packet.net/developers/api/facilities/).

Returns:



29
# File 'lib/ansible/ruby/modules/generated/cloud/packet/packet_device.rb', line 29

attribute :facility

#featuresObject?

Returns Dict with “features” for device creation. See Packet API docs for details.

Returns:

  • (Object, nil)

    Dict with “features” for device creation. See Packet API docs for details.



32
# File 'lib/ansible/ruby/modules/generated/cloud/packet/packet_device.rb', line 32

attribute :features

#hostnamesObject?

Returns A hostname of a device, or a list of hostnames.,If given string or one-item list, you can use the C(“%d”) Python string format to expand numbers from I(count).,If only one hostname, it might be expanded to list if I(count)>1.

Returns:

  • (Object, nil)

    A hostname of a device, or a list of hostnames.,If given string or one-item list, you can use the C(“%d”) Python string format to expand numbers from I(count).,If only one hostname, it might be expanded to list if I(count)>1.



35
# File 'lib/ansible/ruby/modules/generated/cloud/packet/packet_device.rb', line 35

attribute :hostnames

#ipxe_script_urlObject?

Returns URL of custom iPXE script for provisioning.,More about custome iPXE for Packet devices at U(help.packet.net/technical/infrastructure/custom-ipxe).

Returns:



67
# File 'lib/ansible/ruby/modules/generated/cloud/packet/packet_device.rb', line 67

attribute :ipxe_script_url

#lockedBoolean?

Returns Whether to lock a created device.

Returns:

  • (Boolean, nil)

    Whether to lock a created device.



38
# File 'lib/ansible/ruby/modules/generated/cloud/packet/packet_device.rb', line 38

attribute :locked

#operating_systemObject?

Returns OS slug for device creation. See Packet API for current list - U(www.packet.net/developers/api/operatingsystems/).

Returns:



42
# File 'lib/ansible/ruby/modules/generated/cloud/packet/packet_device.rb', line 42

attribute :operating_system

#planObject?

Returns Plan slug for device creation. See Packet API for current list - U(www.packet.net/developers/api/plans/).

Returns:



45
# File 'lib/ansible/ruby/modules/generated/cloud/packet/packet_device.rb', line 45

attribute :plan

#project_idObject

Returns ID of project of the device.

Returns:

  • (Object)

    ID of project of the device.



48
# File 'lib/ansible/ruby/modules/generated/cloud/packet/packet_device.rb', line 48

attribute :project_id

#state:present, ...

Returns Desired state of the device.,If set to C(present) (the default), the module call will return immediately after the device-creating HTTP request successfully returns.,If set to C(active), the module call will block until all the specified devices are in state active due to the Packet API, or until I(wait_timeout).

Returns:

  • (:present, :absent, :active, :inactive, :rebooted, nil)

    Desired state of the device.,If set to C(present) (the default), the module call will return immediately after the device-creating HTTP request successfully returns.,If set to C(active), the module call will block until all the specified devices are in state active due to the Packet API, or until I(wait_timeout).



52
# File 'lib/ansible/ruby/modules/generated/cloud/packet/packet_device.rb', line 52

attribute :state

#user_dataObject?

Returns Userdata blob made available to the machine.

Returns:

  • (Object, nil)

    Userdata blob made available to the machine



56
# File 'lib/ansible/ruby/modules/generated/cloud/packet/packet_device.rb', line 56

attribute :user_data

#wait_for_public_IPv4, ...

Returns Whether to wait for the instance to be assigned a public IPv4/IPv6 address.,If set to 4, it will wait until IPv4 is assigned to the instance.,If set to 6, wait until public IPv6 is assigned to the instance.

Returns:

  • (4, 6, nil)

    Whether to wait for the instance to be assigned a public IPv4/IPv6 address.,If set to 4, it will wait until IPv4 is assigned to the instance.,If set to 6, wait until public IPv6 is assigned to the instance.



59
# File 'lib/ansible/ruby/modules/generated/cloud/packet/packet_device.rb', line 59

attribute :wait_for_public_IPv

#wait_timeoutInteger?

Returns How long (seconds) to wait either for automatic IP address assignment, or for the device to reach the C(active) I(state).,If I(wait_for_public_IPv) is set and I(state) is C(active), the module will wait for both events consequently, applying the timeout twice.

Returns:

  • (Integer, nil)

    How long (seconds) to wait either for automatic IP address assignment, or for the device to reach the C(active) I(state).,If I(wait_for_public_IPv) is set and I(state) is C(active), the module will wait for both events consequently, applying the timeout twice.



63
# File 'lib/ansible/ruby/modules/generated/cloud/packet/packet_device.rb', line 63

attribute :wait_timeout