Saltstack Official Salt Formula
No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.

72 líneas
1.6KB

  1. {% from "salt/map.jinja" import salt_settings with context %}
  2. python-pip:
  3. pkg.installed
  4. pycrypto:
  5. pip.installed:
  6. - require:
  7. - pkg: python-pip
  8. {% if grains['os_family'] not in ['Debian', 'RedHat'] %}
  9. crypto:
  10. pip.installed:
  11. - require:
  12. - pkg: python-pip
  13. {% endif %}
  14. apache-libcloud:
  15. pip.installed:
  16. - require:
  17. - pkg: python-pip
  18. {% if salt_settings.install_packages %}
  19. salt-cloud:
  20. pkg.installed:
  21. - name: {{ salt_settings.salt_cloud }}
  22. - require:
  23. - pip: apache-libcloud
  24. - pip: pycrypto
  25. {% if grains['os_family'] not in ['Debian', 'RedHat'] %}
  26. - pip: crypto
  27. {% endif %}
  28. {% endif %}
  29. {% for cert in pillar.get('salt_cloud_certs', {}) %}
  30. {% for type in ['pem'] %}
  31. cloud-cert-{{ cert }}-pem:
  32. file.managed:
  33. - name: {{ salt_settings.config_path }}/pki/cloud/{{ cert }}.pem
  34. - source: salt://{{ slspath }}/files/key
  35. - template: jinja
  36. - user: root
  37. - group: root
  38. - mode: 600
  39. - makedirs: True
  40. - defaults:
  41. key: {{ cert }}
  42. type: {{ type }}
  43. {% endfor %}
  44. {% endfor %}
  45. {%- for dir, templ_path in salt_settings.cloud.template_sources.items() %}
  46. salt-cloud-{{ dir }}:
  47. file.recurse:
  48. - name: {{ salt_settings.config_path }}/cloud.{{ dir }}.d
  49. - source: {{ templ_path }}
  50. - template: jinja
  51. - makedirs: True
  52. {%- endfor %}
  53. salt-cloud-providers-permissions:
  54. file.directory:
  55. - name: {{ salt_settings.config_path }}/cloud.providers.d
  56. - user: root
  57. - group: root
  58. - file_mode: 600
  59. - dir_mode: 700
  60. - recurse:
  61. - user
  62. - group
  63. - mode