Skip to content

Commit

Permalink
Merge pull request #12 from kibatic/optional-host-copy
Browse files Browse the repository at this point in the history
make host_copy optional
  • Loading branch information
eliecharra authored May 24, 2018
2 parents 842ecf2 + bdaca7d commit 28cbfdd
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tasks/create_unit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
with_subelements:
- "{{ systemd_units }}"
- host_copy
- skip_missing: True
tags:
- systemd
- systemd_units
Expand All @@ -34,6 +35,7 @@
with_subelements:
- "{{ systemd_units }}"
- host_copy
- skip_missing: True
when: item.1.template is not defined or item.1.template == false
tags:
- systemd
Expand All @@ -44,6 +46,7 @@
with_subelements:
- "{{ systemd_units }}"
- host_copy
- skip_missing: True
when: item.1.template is defined and item.1.template == true

- name: create docker networks
Expand Down
6 changes: 6 additions & 0 deletions tests/units/nginx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@ systemd_units:
host_copy: []
network: host

# Cover optional host_copy
- name: nginx-host
template_name: templates/test-systemd
image: nginx:1.11
network: host

default_docker_options: '--add-host test:8.8.8.8'
default_docker_labels:
- fooLabel=barLabel

0 comments on commit 28cbfdd

Please sign in to comment.