Browse Source

Doc validity check for redhat

tags/2016.12
Filip Pytloun 9 years ago
parent
commit
7589acdad1
2 changed files with 5 additions and 2 deletions
  1. +3
    -0
      linux/map.jinja
  2. +2
    -2
      linux/system/doc.sls

+ 3
- 0
linux/map.jinja View File

'package': {}, 'package': {},
'selinux': 'permissive', 'selinux': 'permissive',
'ca_certs_dir': '/usr/local/share/ca-certificates', 'ca_certs_dir': '/usr/local/share/ca-certificates',
'doc_validity_pkgs': ['python-yaml'],
}, },
'Debian': { 'Debian': {
'pkgs': ['python-apt','vim'], 'pkgs': ['python-apt','vim'],
'package': {}, 'package': {},
'selinux': 'permissive', 'selinux': 'permissive',
'ca_certs_dir': '/usr/local/share/ca-certificates', 'ca_certs_dir': '/usr/local/share/ca-certificates',
'doc_validity_pkgs': ['python-yaml'],
}, },
'RedHat': { 'RedHat': {
'pkgs': ['policycoreutils', 'policycoreutils-python', 'vim-enhanced', 'telnet', 'wget'], 'pkgs': ['policycoreutils', 'policycoreutils-python', 'vim-enhanced', 'telnet', 'wget'],
'package': {}, 'package': {},
'selinux': 'permissive', 'selinux': 'permissive',
'ca_certs_dir': '/usr/local/share/ca-certificates', 'ca_certs_dir': '/usr/local/share/ca-certificates',
'doc_validity_pkgs': ['PyYAML'],
}, },
}, grain='os_family', merge=salt['pillar.get']('linux:system')) %} }, grain='os_family', merge=salt['pillar.get']('linux:system')) %}



+ 2
- 2
linux/system/doc.sls View File



linux_system_doc_validity_check: linux_system_doc_validity_check:
pkg.installed: pkg.installed:
- name: python-yaml
- names: {{ system.doc_validity_pkgs }}
cmd.wait: cmd.wait:
- name: python -c "import yaml; stream = file('/etc/salt/grains.d/sphinx', 'r'); yaml.load(stream); stream.close()" - name: python -c "import yaml; stream = file('/etc/salt/grains.d/sphinx', 'r'); yaml.load(stream); stream.close()"
- require: - require:
- watch: - watch:
- file: linux_system_doc_grain - file: linux_system_doc_grain


{%- endif %}
{%- endif %}

Loading…
Cancel
Save