Browse Source

Misc fixes

* Add\fix __virtual__ for modules
  * Remove unneded multiline for repo.sls

Change-Id: I1f8d321b68dfe6a44264b4ddcd6cd0c576938da1
master
azvyagintsev 6 years ago
parent
commit
42b64a1f29
3 changed files with 6 additions and 2 deletions
  1. +3
    -0
      _modules/linux_hosts.py
  2. +2
    -0
      _modules/linux_netlink.py
  3. +1
    -2
      linux/system/repo.sls

+ 3
- 0
_modules/linux_hosts.py View File



from jinja2 import Undefined from jinja2 import Undefined


def __virtual__():
return 'linux_hosts'

def fqdn_sort_fn(n1, n2): def fqdn_sort_fn(n1, n2):
l1 = n1.split('.') l1 = n1.split('.')
l2 = n2.split('.') l2 = n2.split('.')

+ 2
- 0
_modules/linux_netlink.py View File



import re import re


def __virtual__():
return 'linux_netlink'


def ls(regex): def ls(regex):
""" """

+ 1
- 2
linux/system/repo.sls View File

linux_repo_{{ name }}_key: linux_repo_{{ name }}_key:
{% set repo_key = salt['hashutil.base64_b64encode'](repo.key) %} {% set repo_key = salt['hashutil.base64_b64encode'](repo.key) %}
cmd.run: cmd.run:
- name: |
echo '{{ repo_key }}' | base64 -d | apt-key add -
- name: "echo '{{ repo_key }}' | base64 -d | apt-key add -"
- require_in: - require_in:
{%- if repo.get('default', False) %} {%- if repo.get('default', False) %}
- file: default_repo_list - file: default_repo_list

Loading…
Cancel
Save