diff --git a/defaults/main.yml b/defaults/main.yml index 68d241f..a3db893 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -1,8 +1,5 @@ --- -bareos_version: 19.2 -bareos_distribution_major_version: '{{ ansible_distribution_major_version }}' -bareos_repo: http://download.bareos.org/bareos/release -bareos_url: '{{ bareos_repo }}/{{ bareos_version }}/Debian_{{ bareos_distribution_major_version }}' +bareos_repo: http://download.bareos.org/current bareos_client: true bareos_client_name: '{{ inventory_hostname_short }}' bareos_client_max_concurrent_jobs: 2 @@ -23,4 +20,5 @@ bareos_storage: false bareos_storage_name: '{{ inventory_hostname_short }}' bareos_storage_max_concurrent_jobs: 10 bareos_storage_devices: {} +bareos_storage_droplet: false bareos_web: false diff --git a/meta/main.yml b/meta/main.yml index 2f4c021..854aacf 100644 --- a/meta/main.yml +++ b/meta/main.yml @@ -12,9 +12,14 @@ galaxy_info: - name: Debian versions: - buster + - name: Ubuntu + versions: + - focal + - jammy galaxy_tags: - - bacula + - bareos - backup -dependencies: [] +dependencies: + - postgresql diff --git a/tasks/repo.yml b/tasks/repo.yml index b915ca4..24e17cc 100644 --- a/tasks/repo.yml +++ b/tasks/repo.yml @@ -5,6 +5,17 @@ - gnupg tags: bareos +- name: "Set bareos url based on the OS type" + ansible.builtin.include_vars: "{{ lookup('ansible.builtin.first_found', params) }}" + vars: + params: + files: + - '{{ansible_distribution}}.yaml' + - '{{ansible_os_family}}.yaml' + - default.yaml + paths: + - 'vars' + - name: import repo key ansible.builtin.apt_key: url: '{{ bareos_url }}/Release.key' diff --git a/tasks/storage.yml b/tasks/storage.yml index d45d3ff..2c191ca 100644 --- a/tasks/storage.yml +++ b/tasks/storage.yml @@ -5,6 +5,13 @@ - bareos-storage tags: bareos +- name: install droplet storage plugin + ansible.builtin.package: + name: + - bareos-storage-droplet + when: bareos_storage_droplet + tags: bareos + - name: copy storage configuration 1/3 ansible.builtin.template: src: storage-bareos-sd.conf.j2 diff --git a/vars/Debian.yml b/vars/Debian.yml new file mode 100644 index 0000000..5417590 --- /dev/null +++ b/vars/Debian.yml @@ -0,0 +1 @@ +bareos_url: '{{ bareos_repo }}/Debian_{{ ansible_distribution_major_version }}' \ No newline at end of file diff --git a/vars/Ubuntu.yml b/vars/Ubuntu.yml new file mode 100644 index 0000000..0e26c5d --- /dev/null +++ b/vars/Ubuntu.yml @@ -0,0 +1 @@ +bareos_url: '{{ bareos_repo }}/xUbuntu_{{ ansible_distribution_version }}' \ No newline at end of file diff --git a/vars/main.yml b/vars/main.yml new file mode 100644 index 0000000..73b314f --- /dev/null +++ b/vars/main.yml @@ -0,0 +1 @@ +--- \ No newline at end of file