diff --git a/tasks/main.yml b/tasks/main.yml index 129abf8..e444eea 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -4,7 +4,8 @@ # systemd uses - for dir separator, so dirs with dashes need escaped according to systemd-escape rules # - +- name: Include OS-specific variables. + include_vars: "{{ ansible_os_family }}.yml" - name: Make sure destination dir exists file: @@ -41,7 +42,7 @@ - name: SYSTEMD MOUNT | Install needed packages package: name: "{{ item }}" - state: installed + state: present with_items: "{{ systemd_mount_packages }}" become: yes diff --git a/vars/Archlinux.yml b/vars/Archlinux.yml new file mode 100644 index 0000000..5486b06 --- /dev/null +++ b/vars/Archlinux.yml @@ -0,0 +1,5 @@ +--- +systemd_mount_packages: + - cifs-utils + - nfs-utils + - davfs2 \ No newline at end of file diff --git a/vars/Debian.yml b/vars/Debian.yml new file mode 100644 index 0000000..9cc7306 --- /dev/null +++ b/vars/Debian.yml @@ -0,0 +1,5 @@ +--- +systemd_mount_packages: + - cifs-utils + - nfs-common + - davfs2 \ No newline at end of file