A instalação do pacote rpm do Saltstack falha

2

Então eu tenho esses erros enquanto executo o sal -G 'os: centos' state.apply

----------
      ID: filebeat
Function: pkg.installed
  Result: False
 Comment: An exception occurred in this state: Traceback (most recent call la   st):
            File "/usr/lib/python2.6/site-packages/salt/state.py", line 1744,    in call
              **cdata['kwargs'])
            File "/usr/lib/python2.6/site-packages/salt/loader.py", line 1702   , in wrapper
              return f(*args, **kwargs)
            File "/usr/lib/python2.6/site-packages/salt/states/pkg.py", line    1442, in installed
              **kwargs)
            File "/usr/lib/python2.6/site-packages/salt/modules/yumpkg.py", l   ine 1111, in install
              rpm_info = __salt__['lowpkg.bin_pkg_info'](pkg_source)
            File "/usr/lib/python2.6/site-packages/salt/modules/rpm.py", line    120, in bin_pkg_info
              for field in pkginfo._fields:
          AttributeError: 'NoneType' object has no attribute '_fields'
 Started: 07:57:34.542126
Duration: 10800.412 ms

Alterações:

Isso faz parte do meu arquivo .yml.

    filebeat:
   pkg.installed:
      {% if grains['os'] == 'Debian' or 'Ubuntu' %}
      - sources:
         - filebeat: https://artifacts.elastic.co/downloads/beats/filebeat/filebeat-
5.1.2-amd64.deb
      {% elif grains['os'] == 'Centos' %}
      - sources:
         - filebeat : https://artifacts.elastic.co/downloads/beats/filebeat/filebeat
-5.1.2-x86_64.rpm
      {% endif %}
    
por Shadowraze 17.01.2017 / 14:25

1 resposta

0

Ok, eu fiz isso funcionar de maneira retardada, talvez alguém me diga da melhor maneira às vezes aqui.

    filebeat:
   pkg.installed:
      {% if grains['os'] == 'Debian' or 'Ubuntu' %}
      - sources:
         - filebeat: https://artifacts.elastic.co/downloads/beats/filebeat/filebeat-5.1.2-amd64.deb
      {% endif %}
      {% if grains['os'] == 'CentOS' %}
      - sources:
         - filebeat: https://artifacts.elastic.co/downloads/beats/filebeat/filebeat-5.1.2-x86_64.rpm
      {% endif %}
    
por 17.01.2017 / 15:22