Skip to content

Commit

Permalink
fix: Fixed error when using external vars for defining container_name. (
Browse files Browse the repository at this point in the history
  • Loading branch information
epou authored Aug 13, 2024
1 parent 3bab977 commit 1a25a62
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion handlers/main.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
- name: "restart container {{ container_name }}"
- name: "restart container"
service:
name: '{{ service_name }}.service'
state: restarted
Expand Down
6 changes: 3 additions & 3 deletions tasks/install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@
group: root
mode: '0600'
when: container_env is defined
notify: restart container {{ container_name }}
notify: restart container

- name: Pull image {{ container_image }}
community.docker.docker_image:
name: '{{ container_image }}'
force_source: '{{ container_docker_pull_force_source | bool }}'
source: pull
when: container_docker_pull
notify: restart container {{ container_name }}
notify: restart container

- name: Create unit {{ service_name }}.service
template:
Expand All @@ -24,7 +24,7 @@
owner: root
group: root
mode: '0644'
notify: restart container {{ container_name }}
notify: restart container

- name: Enable and start {{ container_name }}
systemd:
Expand Down

0 comments on commit 1a25a62

Please sign in to comment.