Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ This will create:
* `container_links` (default: _[]_) - List of `--link` arguments
* `container_labels` (default: _[]_) - List of `-l` arguments
* `container_docker_pull` (default: _yes_) - whether the docker image should be pulled
* `container_docker_pull_force_source` (default: _yes_) - whether the docker image pull should be executed at every time (see [`docker_image.force_source`](https://docs.ansible.com/ansible/latest/collections/community/docker/docker_image_module.html#parameter-force_source))
* `container_cap_add` (default _[]_) - List of capabilities to add
* `container_cap_drop` (default _{}_) - List of capabilities to drop
* `container_network` (default _""_) - [Network settings](https://docs.docker.com/engine/reference/run/#network-settings)
Expand Down
3 changes: 2 additions & 1 deletion defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
container_name: "{{ name }}"
container_docker_pull: true
container_docker_pull_force_source: true
container_labels: []
container_cmd: []
container_host_network: false
Expand All @@ -21,4 +22,4 @@ service_masked: false
service_state: started
service_restart: true
template_env_path: "env.j2"
template_unit_path: "unit.j2"
template_unit_path: "unit.j2"
2 changes: 1 addition & 1 deletion tasks/install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
- name: Pull image {{ container_image }}
docker_image:
name: '{{ container_image }}'
force_source: true
force_source: '{{ container_docker_pull_force_source | bool }}'
source: pull
when: container_docker_pull
notify: restart container {{ container_name }}
Expand Down