Skip to content

Commit

Permalink
your_spotify: rename database instance
Browse files Browse the repository at this point in the history
Currently produces invalid host format warnings.
  • Loading branch information
saltydk committed Dec 25, 2023
1 parent b301ee6 commit a9c6c29
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion roles/your_spotify/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,29 @@
dns_zone: "{{ lookup('vars', role_name + '_dns_zone') }}"
dns_proxy: "{{ lookup('vars', role_name + '_dns_proxy') }}"

- name: Check for previous '/opt/your_spotify_db' folder
ansible.builtin.stat:
path: "/opt/your_spotify_db"
register: your_spotify_old_database

- name: Migration Block
when: your_spotify_old_database.stat.exists
block:
- name: Remove existing Docker container
ansible.builtin.include_tasks: "{{ resources_tasks_path }}/docker/remove_docker_container.yml"
vars:
_var_prefix: "your_spotify_db"

- name: Move folder
ansible.builtin.shell: mv /opt/your_spotify_db /opt/your-spotify-db
become: true
become_user: "{{ user.name }}"

- name: MongoDB Role
ansible.builtin.include_role:
name: mongodb
vars:
mongodb_instances: ["your_spotify_db"]
mongodb_instances: ["your-spotify-db"]
mongodb_paths_location: "{{ server_appdata_path }}/{{ your_spotify_name }}"

- name: Remove existing Docker container
Expand Down

0 comments on commit a9c6c29

Please sign in to comment.