Class: Ansible::Ruby::Modules::Docker_service
- Inherits:
-
Base
- Object
- Ansible::Ruby::Models::Base
- Base
- Ansible::Ruby::Modules::Docker_service
- Defined in:
- lib/ansible/ruby/modules/generated/core/cloud/docker/docker_service.rb
Instance Method Summary collapse
-
#build ⇒ Boolean?
Whether or not to build images before starting containers.,Missing images will always be built.,If an image is present and C(build) is false, the image will not be built.,If an image is present and C(build) is true, the image will be built.
-
#debug ⇒ Boolean?
Include I(actions) in the return values.
-
#definition ⇒ Object?
Provide docker-compose yaml describing one or more services, networks and volumes.,Mutually exclusive with C(project_src) and C(project_files).
-
#dependencies ⇒ Boolean?
When C(state) is I(present) specify whether or not to include linked services.
-
#files ⇒ Object?
List of file names relative to C(project_src).
-
#hostname_check ⇒ Boolean?
Whether or not to check the Docker daemon’s hostname against the name provided in the client certificate.
-
#project_name ⇒ Object?
Provide a project name.
-
#project_src ⇒ Object?
Path to a directory containing a docker-compose.yml or docker-compose.yaml file.,Mutually exclusive with C(definition).,Required when no C(definition) is provided.
-
#recreate ⇒ :always, ...
By default containers will be recreated when their configuration differs from the service definition.,Setting to I(never) ignores configuration differences and leaves existing containers unchanged.,Setting to I(always) forces recreation of all existing containers.
-
#remove_images ⇒ Object?
Use with state I(absent) to remove the all images or only local images.
-
#remove_volumes ⇒ Boolean?
Use with state I(absent) to remove data volumes.
-
#restarted ⇒ Boolean?
Use with state I(present) to restart all containers.
-
#scale ⇒ Object?
When C(sate) is I(present) scale services.
-
#services ⇒ Object?
When C(state) is I(present) run I(docker-compose up) on a subset of services.
-
#state ⇒ :absent, ...
Desired state of the project.,Specifying I(present) is the same as running I(docker-compose up).,Specifying I(absent) is the same as running I(docker-compose down).
-
#stopped ⇒ Boolean?
Use with state I(present) to leave the containers in an exited or non-running state.
Methods inherited from Base
Methods inherited from Ansible::Ruby::Models::Base
attr_option, attr_options, attribute, #initialize, #to_h, validates
Constructor Details
This class inherits a constructor from Ansible::Ruby::Models::Base
Instance Method Details
#build ⇒ Boolean?
Returns Whether or not to build images before starting containers.,Missing images will always be built.,If an image is present and C(build) is false, the image will not be built.,If an image is present and C(build) is true, the image will be built.
44 |
# File 'lib/ansible/ruby/modules/generated/core/cloud/docker/docker_service.rb', line 44 attribute :build |
#debug ⇒ Boolean?
Returns Include I(actions) in the return values.
63 |
# File 'lib/ansible/ruby/modules/generated/core/cloud/docker/docker_service.rb', line 63 attribute :debug |
#definition ⇒ Object?
Returns Provide docker-compose yaml describing one or more services, networks and volumes.,Mutually exclusive with C(project_src) and C(project_files).
33 |
# File 'lib/ansible/ruby/modules/generated/core/cloud/docker/docker_service.rb', line 33 attribute :definition |
#dependencies ⇒ Boolean?
Returns When C(state) is I(present) specify whether or not to include linked services.
29 |
# File 'lib/ansible/ruby/modules/generated/core/cloud/docker/docker_service.rb', line 29 attribute :dependencies |
#files ⇒ Object?
Returns List of file names relative to C(project_src). Overrides docker-compose.yml or docker-compose.yaml.,Files are loaded and merged in the order given.
16 |
# File 'lib/ansible/ruby/modules/generated/core/cloud/docker/docker_service.rb', line 16 attribute :files |
#hostname_check ⇒ Boolean?
Returns Whether or not to check the Docker daemon’s hostname against the name provided in the client certificate.
36 |
# File 'lib/ansible/ruby/modules/generated/core/cloud/docker/docker_service.rb', line 36 attribute :hostname_check |
#project_name ⇒ Object?
Returns Provide a project name. If not provided, the project name is taken from the basename of C(project_src).,Required when no C(definition) is provided.
13 |
# File 'lib/ansible/ruby/modules/generated/core/cloud/docker/docker_service.rb', line 13 attribute :project_name |
#project_src ⇒ Object?
Returns Path to a directory containing a docker-compose.yml or docker-compose.yaml file.,Mutually exclusive with C(definition).,Required when no C(definition) is provided.
10 |
# File 'lib/ansible/ruby/modules/generated/core/cloud/docker/docker_service.rb', line 10 attribute :project_src |
#recreate ⇒ :always, ...
Returns By default containers will be recreated when their configuration differs from the service definition.,Setting to I(never) ignores configuration differences and leaves existing containers unchanged.,Setting to I(always) forces recreation of all existing containers.
40 |
# File 'lib/ansible/ruby/modules/generated/core/cloud/docker/docker_service.rb', line 40 attribute :recreate |
#remove_images ⇒ Object?
Returns Use with state I(absent) to remove the all images or only local images.
48 |
# File 'lib/ansible/ruby/modules/generated/core/cloud/docker/docker_service.rb', line 48 attribute :remove_images |
#remove_volumes ⇒ Boolean?
Returns Use with state I(absent) to remove data volumes.
51 |
# File 'lib/ansible/ruby/modules/generated/core/cloud/docker/docker_service.rb', line 51 attribute :remove_volumes |
#restarted ⇒ Boolean?
Returns Use with state I(present) to restart all containers.
59 |
# File 'lib/ansible/ruby/modules/generated/core/cloud/docker/docker_service.rb', line 59 attribute :restarted |
#scale ⇒ Object?
Returns When C(sate) is I(present) scale services. Provide a dictionary of key/value pairs where the key is the name of the service and the value is an integer count for the number of containers.
26 |
# File 'lib/ansible/ruby/modules/generated/core/cloud/docker/docker_service.rb', line 26 attribute :scale |
#services ⇒ Object?
Returns When C(state) is I(present) run I(docker-compose up) on a subset of services.
23 |
# File 'lib/ansible/ruby/modules/generated/core/cloud/docker/docker_service.rb', line 23 attribute :services |
#state ⇒ :absent, ...
Returns Desired state of the project.,Specifying I(present) is the same as running I(docker-compose up).,Specifying I(absent) is the same as running I(docker-compose down).
19 |
# File 'lib/ansible/ruby/modules/generated/core/cloud/docker/docker_service.rb', line 19 attribute :state |
#stopped ⇒ Boolean?
Returns Use with state I(present) to leave the containers in an exited or non-running state.
55 |
# File 'lib/ansible/ruby/modules/generated/core/cloud/docker/docker_service.rb', line 55 attribute :stopped |