Skip to content

Commit

Permalink
Settings: Will now add a space after colon in YAML files.
Browse files Browse the repository at this point in the history
- Should prevent any errors in YAML formatting issues in the future.
  • Loading branch information
desimaniac committed May 27, 2019
1 parent f892eae commit 82a7779
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
5 changes: 5 additions & 0 deletions roles/settings/tasks/subtasks/migrator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@
- name: Migrator | All | Migration 01
include_tasks: "migrator/all/migration_01.yml"

# Add single space after colon (if needed)
- name: Migrator | All | Migration 02
include_tasks: "migrator/all/migration_02.yml"
when: (file != "backup_config.yml")

when: (file != "ansible.cfg")

- name: Migrator | Migrations for 'ansible.cfg'
Expand Down
21 changes: 21 additions & 0 deletions roles/settings/tasks/subtasks/migrator/all/migration_02.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
########################################################################################
# Title: Cloudbox: Settings | Migrator | All | Migration 02 #
# Author(s): desimaniac #
# URL: https://github.com/cloudbox/cloudbox #
# -- #
# Part of the Cloudbox project: https://cloudbox.works #
########################################################################################
# GNU General Public License v3.0 #
########################################################################################
---
- name: Migrator | All | '{{ file }}' | Migration 02 | Add single space after colon (if needed)
replace:
path: "{{ playbook_dir }}/{{ file }}"
regexp: '(:)[ \t]*(.*)'
replace: '\1 \2'
owner: "{{ cloudbox_yml.stat.uid }}"
group: "{{ cloudbox_yml.stat.gid }}"
mode: 0664

- name: Migrator | All | '{{ file }}' | Migration 02 | Re-import Variables
include_vars: "{{ playbook_dir }}/{{ file }}"

0 comments on commit 82a7779

Please sign in to comment.