Skip to content

Commit

Permalink
Update main.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
MrDoobPG authored and MrDoobPG committed Sep 11, 2019
1 parent 0e2c47a commit 291f1cb
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions menu/roles/docker/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,19 +29,20 @@
- check.stat.exists == True
- switch == "on"

- name: checking service status
command: systemctl status "{{ item }}"
- name: "Check for working Docker Install"
command: "systemctl status "{{ item }}"
with_items:
- docker
register: result
ignore_errors: yes

- name: showing report
debug:
var: result

- pause:
minutes: 1
register: status_docker
failed_when: >
status_docker.rc != 0 and ("could not be found" not in status_docker.stderr)
changed_when: false
- name: "Docker stopping"
service:
name: docker
state: stopped
when: "status_docker.rc == 0"
#########update part
- name: Update APT package cache
apt: update_cache=yes cache_valid_time=600
Expand Down

0 comments on commit 291f1cb

Please sign in to comment.