Class: Ansible::Ruby::Modules::Docker_network
- Inherits:
-
Base
- Object
- Ansible::Ruby::Models::Base
- Base
- Ansible::Ruby::Modules::Docker_network
- 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
-
#appends ⇒ :yes, ...
By default the connected list is canonical, meaning containers not on the list are removed from the network.
-
#connected ⇒ Array<String>, ...
List of container names or container IDs to connect to a network.
-
#driver ⇒ String?
Specify the type of network.
-
#driver_options ⇒ Hash?
Dictionary of network settings.
-
#force ⇒ :yes, ...
With state I(absent) forces disconnecting all containers from the network prior to deleting the network.
-
#ipam_driver ⇒ Object?
Specify an IPAM driver.
-
#ipam_options ⇒ Hash?
Dictionary of IPAM options.
-
#name ⇒ String
Name of the network to operate on.
-
#state ⇒ :absent, ...
I(absent) deletes the network.
Methods inherited from Base
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.
33 |
# File 'lib/ansible/ruby/modules/generated/cloud/docker/docker_network.rb', line 33 attribute :appends |
#connected ⇒ Array<String>, ...
Returns 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 |
#driver ⇒ String?
Returns 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_options ⇒ Hash?
Returns 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.
29 |
# File 'lib/ansible/ruby/modules/generated/cloud/docker/docker_network.rb', line 29 attribute :force |
#ipam_driver ⇒ Object?
Returns Specify an IPAM driver.
37 |
# File 'lib/ansible/ruby/modules/generated/cloud/docker/docker_network.rb', line 37 attribute :ipam_driver |
#ipam_options ⇒ Hash?
Returns Dictionary of IPAM options.
40 |
# File 'lib/ansible/ruby/modules/generated/cloud/docker/docker_network.rb', line 40 attribute :ipam_options |
#name ⇒ String
Returns 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.
44 |
# File 'lib/ansible/ruby/modules/generated/cloud/docker/docker_network.rb', line 44 attribute :state |