Saltstack Official Salt Formula
Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

65 Zeilen
1.4KB

  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: /etc/salt/pki/cloud/{{ cert }}.pem
  34. - source: salt://salt/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 in ['providers', 'profiles', 'maps'] %}
  46. {%- set source = salt_settings.cloud.template_sources.get(dir) %}
  47. salt-cloud-{{ dir }}:
  48. file.recurse:
  49. - name: /etc/salt/cloud.{{ dir }}.d
  50. - source: {{ source }}
  51. - template: jinja
  52. - user: root
  53. - group: root
  54. - dir_mode: 755
  55. - file_mode: 644
  56. - makedirs: True
  57. {%- endfor %}