mirror of
https://github.com/luzifer-ansible/docker-compose.git
synced 2024-12-22 17:01:17 +00:00
Do not start services in packer builds
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
9680cb1fac
commit
c924400ee0
1 changed files with 4 additions and 6 deletions
|
@ -76,19 +76,18 @@
|
||||||
WantedBy=docker.service
|
WantedBy=docker.service
|
||||||
register: docker_compose_service
|
register: docker_compose_service
|
||||||
|
|
||||||
- name: Start and enable docker-compose service
|
- name: Enable docker-compose service
|
||||||
systemd:
|
systemd:
|
||||||
name: docker-compose.service
|
name: docker-compose.service
|
||||||
daemon_reload: yes
|
daemon_reload: yes
|
||||||
enabled: yes
|
enabled: yes
|
||||||
state: started
|
|
||||||
|
|
||||||
- name: Restart service if service configuration changed
|
- name: Restart service if service configuration changed
|
||||||
systemd:
|
systemd:
|
||||||
name: docker-compose.service
|
name: docker-compose.service
|
||||||
daemon_reload: yes
|
daemon_reload: yes
|
||||||
state: restarted
|
state: restarted
|
||||||
when: docker_compose_service.changed
|
when: docker_compose_service.changed and packer_build_name is not defined
|
||||||
|
|
||||||
- name: Reload and apply configuration
|
- name: Reload and apply configuration
|
||||||
systemd:
|
systemd:
|
||||||
|
@ -124,16 +123,15 @@
|
||||||
WantedBy=timers.target
|
WantedBy=timers.target
|
||||||
register: docker_compose_reload_timer
|
register: docker_compose_reload_timer
|
||||||
|
|
||||||
- name: Enable and start docker-compose-reload.timer
|
- name: Enable docker-compose-reload.timer
|
||||||
systemd:
|
systemd:
|
||||||
name: docker-compose-reload.timer
|
name: docker-compose-reload.timer
|
||||||
daemon_reload: yes
|
daemon_reload: yes
|
||||||
enabled: yes
|
enabled: yes
|
||||||
state: started
|
|
||||||
|
|
||||||
- name: Restart docker-compose-reload.timer if it changed
|
- name: Restart docker-compose-reload.timer if it changed
|
||||||
systemd:
|
systemd:
|
||||||
name: docker-compose-reload.timer
|
name: docker-compose-reload.timer
|
||||||
daemon_reload: yes
|
daemon_reload: yes
|
||||||
state: restarted
|
state: restarted
|
||||||
when: docker_compose_reload_timer.changed
|
when: docker_compose_reload_timer.changed and packer_build_name is not defined
|
||||||
|
|
Loading…
Reference in a new issue