Skip to content
This repository has been archived by the owner on Jan 15, 2024. It is now read-only.

Commit

Permalink
make EXTERNAL_STORAGE_DRIVE lowercase
Browse files Browse the repository at this point in the history
  • Loading branch information
p-j-smith committed Dec 14, 2023
1 parent a03f49f commit 66c4561
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ If you would like to run Ansible Molecule to test this role, the requirements ar

`server_locale`: the sets the user's language, region, etc. This is set to "en_GB.UTF-8"

`EXTERNAL_STORAGE_DRIVE`: path to mounted storage. By default this is undefined.
`external_storage_drive`: path to mounted storage. By default this is undefined.

## Dependencies

Expand Down
8 changes: 4 additions & 4 deletions tasks/check_mounts.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
---
- name: Ensure correct permissions are set for the mountpoint
ansible.builtin.file:
path: "{{ EXTERNAL_STORAGE_DRIVE }}"
path: "{{ external_storage_drive }}"
owner: root
group: root
state: directory
mode: "0755"

- name: "Check if storage is mounted: {{ EXTERNAL_STORAGE_DRIVE }}"
ansible.builtin.command: mountpoint {{ EXTERNAL_STORAGE_DRIVE }}
- name: "Check if storage is mounted: {{ external_storage_drive }}"
ansible.builtin.command: mountpoint {{ external_storage_drive }}
register: check_mountpoint
failed_when: false
changed_when: false
Expand All @@ -20,7 +20,7 @@
when: "'is not a mountpoint' in check_mountpoint.stdout"

- name: Check that storage has been mounted correctly if it was previously not mounted
ansible.builtin.command: mountpoint {{ EXTERNAL_STORAGE_DRIVE }}
ansible.builtin.command: mountpoint {{ external_storage_drive }}
when: "'is not a mountpoint' in check_mountpoint.stdout"
register: check_mountpoint_again
failed_when: "'is not a mountpoint' in check_mountpoint_again.stdout"
Expand Down
2 changes: 1 addition & 1 deletion tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
- name: "Check mounts are available"
tags: restart
ansible.builtin.include_tasks: check_mounts.yml
when: EXTERNAL_STORAGE_DRIVE is defined
when: external_storage_drive is defined

- name: "Set up for specific distribution"
ansible.builtin.include_tasks: "{{ ansible_distribution }}.yml"
Expand Down

0 comments on commit 66c4561

Please sign in to comment.