saltstack-formulas / bareos-formula

A Saltstack formula to install and configure Bareos
http://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html
Other
5 stars 12 forks source link

Dynamically determine source path based on grains info #4

Closed pkleanthous-zz closed 6 years ago

javierbertoli commented 6 years ago

I like your refactoring, but it breaks the formula for current Debian's repo path, as Bareos is not providing yet a Debian_9.0 path, and the osfingermap.yaml file is setting it to use the Jessie's repo

Debian-9:
  repo:
    distro: Debian_8.0
pkleanthous-zz commented 6 years ago

Hi @javierbertoli Thanks for your review.

I can add something like:

{% if grains.os == 'Ubuntu' -%}
  {% set distro = 'x' ~ grains.os ~ '_' ~ grains.osrelease %}
{%- elif grains.os == 'Debian' %}
  {% set distro = grains.os ~ '_' ~ grains.osmajorrelease ~ '.0' %}
  # Temporary solution until Bareos release binaries for Debian 9
  {% if grains.osmajorrelease == 9 -%}
    {% set distro = grains.os ~ '_' ~ '8.0' %}
  {%- endif %}
{%- else %}
  {% set distro = grains.os ~ '_' ~ grains.osmajorrelease %}
{%- endif %}
pkleanthous-zz commented 6 years ago

@javierbertoli I'm using ubuntu 16.04 as my development platform and I just created a Debian 9 VM. The formula fails due package dependencies errors

Saltstack message:

errors:
    E: Unable to correct problems, you have held broken packages.

cli output:

apt-get install bareos-filedaemon
.
.
.
The following packages have unmet dependencies:
 bareos-filedaemon : Depends: bareos-common (= 16.2.4-12.1) but it is not going to be installed
                     Depends: libssl1.0.0 (>= 1.0.0) but it is not installable
E: Unable to correct problems, you have held broken packages.

So the formula can't work as is on Debian 9...

javierbertoli commented 6 years ago

@pkleanthous, you're right. Let's merge it as is, then, and add Debian 9 support when available.

javierbertoli commented 6 years ago

Thanks @pkleanthous!!