Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ os_supported_matrix:
# RHEL-based
RedHat:
min_version: '6'
Rocky:
min_version: '6'
CentOS:
min_version: '6'
Fedora:
Expand Down
9 changes: 8 additions & 1 deletion tasks/host_volume.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
- name: check nomad host volumes existence
stat:
path: "{{ item.path }}"
become: true
register: nomad_host_volumes_stat
loop: "{{ nomad_host_volumes }}"

- name: create volume {{ item['name'] }}
file:
path: "{{ item['path'] }}"
owner: "{{ item['owner'] | default(nomad_user) }}"
group: "{{ item['group'] | default(nomad_group) }}"
state: directory
mode: "{{ item['mode'] | default('0755') }}"
with_items: "{{ nomad_host_volumes }}"
loop: "{{ nomad_host_volumes | zip(nomad_host_volumes_stat.results) | selectattr('1.stat.exists', 'equalto', false) | map(attribute='0') | list }}"
1 change: 1 addition & 0 deletions vars/RedHat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ nomad_os_packages:
- git
- "{% if ( ansible_distribution == 'Fedora' and ansible_distribution_version is version('28', '<') ) or \
( ansible_distribution == 'CentOS' and ansible_distribution_version is version('8', '<') ) or \
( ansible_distribution == 'Rocky' and ansible_distribution_version is version('8', '<') ) or \
( ansible_distribution == 'Amazon' and ansible_distribution_version is version('3', '<') ) or \
( ansible_distribution == 'OracleLinux' and ansible_distribution_version is version('8', '<') ) \
%}\
Expand Down