Class: Ansible::Ruby::Modules::Docker_network

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

Overview

Create/remove Docker networks and connect containers to them. Performs largely the same function as the “docker network” CLI subcommand.

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

#appends:yes, ...

Returns By default the connected list is canonical, meaning containers not on the list are removed from the network. Use C(appends) to leave existing containers connected.

Returns:

  • (:yes, :no, nil)

    By default the connected list is canonical, meaning containers not on the list are removed from the network. Use C(appends) to leave existing containers connected.



33
# File 'lib/ansible/ruby/modules/generated/cloud/docker/docker_network.rb', line 33

attribute :appends

#connectedArray<String>, ...

Returns List of container names or container IDs to connect to a network.

Returns:

  • (Array<String>, String, nil)

    List of container names or container IDs to connect to a network.



17
# File 'lib/ansible/ruby/modules/generated/cloud/docker/docker_network.rb', line 17

attribute :connected

#driverString?

Returns Specify the type of network. Docker provides bridge and overlay drivers, but 3rd party drivers can also be used.

Returns:

  • (String, nil)

    Specify the type of network. Docker provides bridge and overlay drivers, but 3rd party drivers can also be used.



21
# File 'lib/ansible/ruby/modules/generated/cloud/docker/docker_network.rb', line 21

attribute :driver

#driver_optionsHash?

Returns Dictionary of network settings. Consult docker docs for valid options and values.

Returns:

  • (Hash, nil)

    Dictionary of network settings. Consult docker docs for valid options and values.



25
# File 'lib/ansible/ruby/modules/generated/cloud/docker/docker_network.rb', line 25

attribute :driver_options

#force:yes, ...

Returns With state I(absent) forces disconnecting all containers from the network prior to deleting the network. With state I(present) will disconnect all containers, delete the network and re-create the network. This option is required if you have changed the IPAM or driver options and want an existing network to be updated to use the new options.

Returns:

  • (:yes, :no, nil)

    With state I(absent) forces disconnecting all containers from the network prior to deleting the network. With state I(present) will disconnect all containers, delete the network and re-create the network. This option is required if you have changed the IPAM or driver options and want an existing network to be updated to use the new options.



29
# File 'lib/ansible/ruby/modules/generated/cloud/docker/docker_network.rb', line 29

attribute :force

#ipam_driverObject?

Returns Specify an IPAM driver.

Returns:

  • (Object, nil)

    Specify an IPAM driver.



37
# File 'lib/ansible/ruby/modules/generated/cloud/docker/docker_network.rb', line 37

attribute :ipam_driver

#ipam_optionsHash?

Returns Dictionary of IPAM options.

Returns:

  • (Hash, nil)

    Dictionary of IPAM options.



40
# File 'lib/ansible/ruby/modules/generated/cloud/docker/docker_network.rb', line 40

attribute :ipam_options

#nameString

Returns Name of the network to operate on.

Returns:

  • (String)

    Name of the network to operate on.



13
# File 'lib/ansible/ruby/modules/generated/cloud/docker/docker_network.rb', line 13

attribute :name

#state:absent, ...

Returns I(absent) deletes the network. If a network has connected containers, it cannot be deleted. Use the C(force) option to disconnect all containers and delete the network.,I(present) creates the network, if it does not already exist with the specified parameters, and connects the list of containers provided via the connected parameter. Containers not on the list will be disconnected. An empty list will leave no containers connected to the network. Use the C(appends) option to leave existing containers connected. Use the C(force) options to force re-creation of the network.

Returns:

  • (:absent, :present, nil)

    I(absent) deletes the network. If a network has connected containers, it cannot be deleted. Use the C(force) option to disconnect all containers and delete the network.,I(present) creates the network, if it does not already exist with the specified parameters, and connects the list of containers provided via the connected parameter. Containers not on the list will be disconnected. An empty list will leave no containers connected to the network. Use the C(appends) option to leave existing containers connected. Use the C(force) options to force re-creation of the network.



44
# File 'lib/ansible/ruby/modules/generated/cloud/docker/docker_network.rb', line 44

attribute :state