Skip to content

Commit

Permalink
Merge pull request #48 from avinetworks/AV-57921
Browse files Browse the repository at this point in the history
Added check existance of the avicontroller service
  • Loading branch information
chaitanyaavi authored Apr 18, 2019
2 parents 3d888c7 + 388d557 commit d9d038b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tasks/docker/fresh_install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,13 @@
when: ansible_service_mgr == 'init' or
( ansible_service_mgr != 'systemd' and not con_new_service )

- name: Avi Controller | Requirements | systemd | Check the avicontroller service exist
stat: path=/etc/systemd/system/avicontroller.service
register: service_status

- name: Avi Controller | Requirements | systemd | Stop the avicontroller service for fresh install
systemd: daemon_reload=yes name=avicontroller enabled=no state=stopped
when: ansible_service_mgr == 'systemd'
when: ansible_service_mgr == 'systemd' and service_status.stat.exists

- name: Avi Controller | Requirements | upstart | Stop the avicontroller service for fresh install
service: name=avicontroller enabled=no state=stopped
Expand Down

0 comments on commit d9d038b

Please sign in to comment.