Fix file paths

This commit is contained in:
Wojciech Kozlowski 2022-12-04 17:46:10 +01:00
parent c3328ddbf4
commit e26ad50415
7 changed files with 13 additions and 3 deletions

View File

@ -8,6 +8,6 @@
_system_base_motd_file != "" _system_base_motd_file != ""
vars: vars:
_file_path: _file_path:
- ../../../{{ motd_dir_path }}/{{ ansible_hostname }} - "{{ motd_dir_path }}/{{ ansible_hostname }}"
_system_base_motd_file: >- _system_base_motd_file: >-
{{ lookup('ansible.builtin.first_found', _file_path, errors='ignore') }} {{ lookup('ansible.builtin.first_found', _file_path, errors='ignore') }}

View File

@ -0,0 +1,6 @@
argument_specs:
main:
options:
smartd_conf_file_path:
type: "str"
required: true

View File

@ -4,7 +4,7 @@
- name: "smartd configuration" - name: "smartd configuration"
ansible.builtin.copy: ansible.builtin.copy:
src: "./smartd.conf" src: "{{ smartd_conf_file_path }}"
dest: "/etc/smartd.conf" dest: "/etc/smartd.conf"
mode: 0644 mode: 0644
register: smartd_conf register: smartd_conf

View File

@ -4,8 +4,12 @@
roles: roles:
- role: "system_ups" - role: "system_ups"
tags: "role:system_ups" tags: "role:system_ups"
vars:
smartd_conf_file_path: "files/system_smart/smartd.conf"
when: the_nine_worlds_production | bool
- role: "system_smart" - role: "system_smart"
tags: "role:system_smart" tags: "role:system_smart"
when: the_nine_worlds_production | bool
- role: "system_zfs" - role: "system_zfs"
tags: "role:system_zfs" tags: "role:system_zfs"
@ -18,4 +22,4 @@
- role: "system_base" - role: "system_base"
tags: "role:system_base" tags: "role:system_base"
vars: vars:
motd_dir_path: "files/motd" motd_dir_path: "files/system_base/motd"