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
Overview
Consumes docker compose to start, shutdown and scale services. Works with compose versions 1 and 2. Compose can be read from a docker-compose.yml (or .yaml) file or inline using the C(definition) option. See the examples for more details. Supports check mode.
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, remove_existing_validations, #to_h, validates
Constructor Details
This class inherits a constructor from Ansible::Ruby::Models::Base
Instance Method Details
#build ⇒ Boolean?
49 |
# File 'lib/ansible/ruby/modules/generated/core/cloud/docker/docker_service.rb', line 49 attribute :build |
#debug ⇒ Boolean?
68 |
# File 'lib/ansible/ruby/modules/generated/core/cloud/docker/docker_service.rb', line 68 attribute :debug |
#definition ⇒ Object?
38 |
# File 'lib/ansible/ruby/modules/generated/core/cloud/docker/docker_service.rb', line 38 attribute :definition |
#dependencies ⇒ Boolean?
34 |
# File 'lib/ansible/ruby/modules/generated/core/cloud/docker/docker_service.rb', line 34 attribute :dependencies |
#files ⇒ Object?
21 |
# File 'lib/ansible/ruby/modules/generated/core/cloud/docker/docker_service.rb', line 21 attribute :files |
#hostname_check ⇒ Boolean?
41 |
# File 'lib/ansible/ruby/modules/generated/core/cloud/docker/docker_service.rb', line 41 attribute :hostname_check |
#project_name ⇒ Object?
18 |
# File 'lib/ansible/ruby/modules/generated/core/cloud/docker/docker_service.rb', line 18 attribute :project_name |
#project_src ⇒ Object?
15 |
# File 'lib/ansible/ruby/modules/generated/core/cloud/docker/docker_service.rb', line 15 attribute :project_src |
#recreate ⇒ :always, ...
45 |
# File 'lib/ansible/ruby/modules/generated/core/cloud/docker/docker_service.rb', line 45 attribute :recreate |
#remove_images ⇒ Object?
53 |
# File 'lib/ansible/ruby/modules/generated/core/cloud/docker/docker_service.rb', line 53 attribute :remove_images |
#remove_volumes ⇒ Boolean?
56 |
# File 'lib/ansible/ruby/modules/generated/core/cloud/docker/docker_service.rb', line 56 attribute :remove_volumes |
#restarted ⇒ Boolean?
64 |
# File 'lib/ansible/ruby/modules/generated/core/cloud/docker/docker_service.rb', line 64 attribute :restarted |
#scale ⇒ Object?
31 |
# File 'lib/ansible/ruby/modules/generated/core/cloud/docker/docker_service.rb', line 31 attribute :scale |
#services ⇒ Object?
28 |
# File 'lib/ansible/ruby/modules/generated/core/cloud/docker/docker_service.rb', line 28 attribute :services |
#state ⇒ :absent, ...
24 |
# File 'lib/ansible/ruby/modules/generated/core/cloud/docker/docker_service.rb', line 24 attribute :state |
#stopped ⇒ Boolean?
60 |
# File 'lib/ansible/ruby/modules/generated/core/cloud/docker/docker_service.rb', line 60 attribute :stopped |