Skip to content

Commit

Permalink
Merge pull request #4 from alexanderbazhenoff/v1.1.9
Browse files Browse the repository at this point in the history
v1.1.9
  • Loading branch information
alexanderbazhenoff authored Dec 20, 2023
2 parents 5854c04 + bf69284 commit ce5be62
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 21 deletions.
2 changes: 1 addition & 1 deletion galaxy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace: alexanderbazhenoff
name: linux
version: 1.1.8
version: 1.1.9
readme: README.md
authors:
- Aleksandr Bazhenov <>
Expand Down
27 changes: 15 additions & 12 deletions roles/bareos/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,19 @@ bareos_components: fd
# Perform clean installation
clean_install: True

# Bareos release, e.g: 21, 20, 19.2, 18.2, etc (https://download.bareos.org/bareos/release/)
# Bareos release, e.g.: 'current', 'next' or 'experimental/<postfix>' (https://download.bareos.org/).
# If you have a valid Bareos subscription, please use the 'bareos/release/<version>' (see
# https://download.bareos.com/bareos/). You can also set 'bareos/contrib/<release>' (deprecated),
# 'bareos/experimental<postfix>' or 'bareos/people/<postfix> (see https://download.bareos.org/bareos/).
# Affects only for Debian and Redhat Linux distribution families.
bareos_release: 21
bareos_release: current

# Override ansible linux distribution major version. Useful when specified Bareos version repo is not available for your
# Linux distribution version, but beware package dependencies problems. You can also override non-LTS Ubuntu versions.
override_ansible_distribution_major_version:

# Bareos repository URL prefix to download from
bareos_url: https://download.bareos.org/bareos/release/
bareos_url: https://download.bareos.org

# More output for troubleshooting
debug_mode: False
Expand All @@ -46,15 +49,15 @@ firewall_control: True

### Bareos related parameters:

# Cleanup Bareos storage files on install or uninstall:
# Cleanup Bareos storage files on installation or uninstall:
cleanup_storage_files: True

# Additional Bareos packages to install: [] or bareos-traymonitor, bareos-vmware-plugin etc...
# Additional Bareos packages to install: [] or bareos-traymonitor, bareos-vmware-plugin etc...
install_additional_bareos_packages:
- "{% if ansible_os_family != 'Alpine' %}bareos-traymonitor{% endif %}"

# List of additional configs to copy on components install. Performs copying items from item.source to item.destination
# with item.owner, item.group and item.mode, otherwise set this list to []
# List of additional configs to copy on component(s) installation. Performs copying items from item.source to
# item.destination with item.owner, item.group and item.mode, otherwise set this list to []
bareos_configs_to_copy:
- source: etc/
destination: /etc
Expand All @@ -71,11 +74,11 @@ webui_password: admin
webui_profile: webui-admin
webui_tls_enable: False

# Default data to add client on Bareos server.
# Default data to add a client on Bareos server.
#
# Component name to display on Bareos server. If undefined FQDN or hostname will be taken.
# Component name to display on Bareos server. If undefined, FQDN or hostname will be taken.
add_component_name: ''
# Password to connect with Bareos server. If empty the random password will be generated.
# Password to connect with Bareos server. If empty, the random password will be generated.
add_component_password: ''
# Length of the password to generate.
add_component_password_gen_length: 16
Expand All @@ -91,11 +94,11 @@ add_component_force: False

### Database related parameters:

# If you wish to use already preinstalled PostgreSQL. Mysql or Sqlite installations not supported in this role.
# If you wish to use already preinstalled PostgreSQL. Mysql or Sqlite installations are not supported in this role.
preinstalled_postgresql: False
# Enable to use Bareos with PostgreSQL, disable for sqlite.
use_postgresql: True
# PostgreSQL version to install by this role. Leave it '' for default version.
# PostgreSQL version to install by this role. Leave it '' for a default version.
postgresql_version: 14
# Install psycopg2: https://pypi.org/project/psycopg2/
install_psycopg2: True
Expand Down
10 changes: 5 additions & 5 deletions roles/bareos/tasks/add_bareos_repo_debian.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
- name: "add bareos repo debian | Set fact for bareos repo URL"
ansible.builtin.set_fact:
repo_url_to_install: >-
{{ bareos_url }}/{{ bareos_release -}}
{% if ansible_distribution == "Debian" and linux_distro_major_version | int >= 10 -%}
{{ bareos_url }}{{ bareos_release }}/{{ ansible_distribution }}_{{ linux_distro_major_version -}}
/{{ ansible_distribution }}_{{ linux_distro_major_version -}}
{% elif ansible_distribution == "Debian" and linux_distro_major_version | int <= 9 -%}
{{ bareos_url }}{{ bareos_release }}/{{ ansible_distribution }}_{{ linux_distro_major_version }}.0{% endif -%}
{% if ansible_distribution == "Ubuntu" -%}
{{ bareos_url }}{{ bareos_release }}/x{{ ansible_distribution }}_{{ linux_distro_major_version }}.04{% endif -%}
/Release
/{{ ansible_distribution }}_{{ linux_distro_major_version -}}
.0{% elif ansible_distribution == "Ubuntu" %}/x{{ ansible_distribution }}_{{ linux_distro_major_version -}}
.04{% endif %}/Release
- name: "add bareos repo debian | (debug) Show repo URL"
ansible.builtin.debug:
Expand Down
6 changes: 3 additions & 3 deletions roles/bareos/tasks/add_bareos_repo_redhat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
- name: "add bareos repo redhat | Trying to set bareos repo URL by Linux distribution"
ansible.builtin.set_fact:
repo_url_to_install: >-
{{ bareos_url }}{{ bareos_release }}/{% if ansible_distribution == 'Red Hat Enterprise Linux' %}RHEL{% else -%}
{{ bareos_url }}/{{ bareos_release }}/{% if ansible_distribution == 'Red Hat Enterprise Linux' %}RHEL{% else -%}
{{ ansible_distribution }}{% endif %}_{{ linux_distro_major_version }}/bareos.repo
- name: "add bareos repo redhat | Include check repo url tasks with distribution-defined URL prefix"
ansible.builtin.include_tasks: check_repo_url.yml

- name: "add bareos repo redhat | First retry to set bareos repo URL"
ansible.builtin.set_fact:
repo_url_to_install: "{{ bareos_url }}{{ bareos_release }}/EL_{{ linux_distro_major_version }}/bareos.repo"
repo_url_to_install: "{{ bareos_url }}/{{ bareos_release }}/EL_{{ linux_distro_major_version }}/bareos.repo"
when: check_repo_url_results.failed

- name: "add bareos repo redhat | Include check repo url tasks with EL_ prefix"
Expand All @@ -20,7 +20,7 @@

- name: "add bareos repo redhat | Second retry to set bareos URL"
ansible.builtin.set_fact:
repo_url_to_install: "{{ bareos_url }}{{ bareos_release }}/RHEL_{{ linux_distro_major_version }}/bareos.repo"
repo_url_to_install: "{{ bareos_url }}/{{ bareos_release }}/RHEL_{{ linux_distro_major_version }}/bareos.repo"
when: check_repo_url_results.failed

- name: "add bareos repo redhat | Include check repo url tasks with RHEL_ prefix"
Expand Down

0 comments on commit ce5be62

Please sign in to comment.