Skip to content

Commit

Permalink
cloudplow: change service name to be in line with other managed services
Browse files Browse the repository at this point in the history
  • Loading branch information
saltydk committed Nov 17, 2024
1 parent b0958f0 commit b1e685a
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
3 changes: 2 additions & 1 deletion roles/cloudplow/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ cloudplow_git_repo_branch_secondary: "develop"
# Systemd
################################

cloudplow_service_name: "{{ cloudplow_name }}"
cloudplow_service_name: "saltbox_managed_{{ cloudplow_name }}"
cloudplow_service_name_old: "{{ cloudplow_name }}"

################################
# Rclone
Expand Down
7 changes: 7 additions & 0 deletions roles/cloudplow/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@
# GNU General Public License v3.0 #
#########################################################################
---
- name: Delete Legacy Service
ansible.builtin.include_tasks: "{{ resources_tasks_path }}/systemd/delete_service.yml"
vars:
_service_name: "{{ cloudplow_service_name_old }}"
tags:
- "cloudplow-disable"

- name: Import Disable Task
ansible.builtin.import_tasks: "subtasks/disable.yml"
when: ('cloudplow-disable' in ansible_run_tags)
Expand Down
9 changes: 4 additions & 5 deletions roles/cloudplow/tasks/subtasks/disable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@
# GNU General Public License v3.0 #
#########################################################################
---
- name: Stop and disable service
ansible.builtin.systemd_service:
name: "{{ cloudplow_service_name }}"
state: stopped
enabled: false
- name: Delete Service
ansible.builtin.include_tasks: "{{ resources_tasks_path }}/systemd/delete_service.yml"
vars:
_service_name: "{{ cloudplow_service_name }}"

0 comments on commit b1e685a

Please sign in to comment.