Saltstack Official Salt Formula
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

pirms 10 gadiem
pirms 10 gadiem
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. {% from "salt/package-map.jinja" import pkgs with context %}
  2. {% set salt = pillar.get('salt', {}) -%}
  3. {% set cloud = salt.get('cloud', {}) -%}
  4. python-pip:
  5. pkg.installed
  6. pycrypto:
  7. pip.installed:
  8. - require:
  9. - pkg: python-pip
  10. {% if grains['os_family'] != 'Debian' %}
  11. crypto:
  12. pip.installed:
  13. - require:
  14. - pkg: python-pip
  15. {% endif %}
  16. apache-libcloud:
  17. pip.installed:
  18. - require:
  19. - pkg: python-pip
  20. salt-cloud:
  21. pkg.installed:
  22. - name: {{ pkgs['salt-cloud'] }}
  23. - require:
  24. - pip: apache-libcloud
  25. - pip: pycrypto
  26. {% if grains['os_family'] != 'Debian' %}
  27. - pip: crypto
  28. {% endif %}
  29. {% for folder in cloud['folders'] %}
  30. {{ folder }}:
  31. file.directory:
  32. - name: /etc/salt/{{ folder }}
  33. - user: root
  34. - group: root
  35. - file_mode: 744
  36. - dir_mode: 755
  37. - makedirs: True
  38. {% endfor %}
  39. {% for cert in pillar.get('salt_cloud_certs', {}) %}
  40. {% for type in ['pem'] %}
  41. cloud-cert-{{ cert }}-pem:
  42. file.managed:
  43. - name: /etc/salt/cloud.providers.d/key/{{ cert }}.pem
  44. - source: salt://salt/files/key
  45. - template: jinja
  46. - user: root
  47. - group: root
  48. - mode: 600
  49. - defaults:
  50. key: {{ cert }}
  51. type: {{ type }}
  52. {% endfor %}
  53. {% endfor %}
  54. {% for providers in cloud['providers'] %}
  55. salt-cloud-profiles-{{ providers }}:
  56. file.managed:
  57. - name: /etc/salt/cloud.profiles.d/{{ providers }}.conf
  58. - template: jinja
  59. - source: salt://salt/files/cloud.profiles.d/{{ providers }}.conf
  60. {% endfor %}
  61. {% for providers in cloud['providers'] %}
  62. salt-cloud-providers-{{ providers }}:
  63. file.managed:
  64. - name: /etc/salt/cloud.providers.d/{{ providers }}.conf
  65. - template: jinja
  66. - source: salt://salt/files/cloud.providers.d/{{ providers }}.conf
  67. {% endfor %}
  68. {% for providers in cloud['providers'] %}
  69. salt-cloud-maps-{{ providers }}:
  70. file.managed:
  71. - name: /etc/salt/cloud.maps.d/{{ providers }}.conf
  72. - template: jinja
  73. - source: salt://salt/files/cloud.maps.d/{{ providers }}.conf
  74. {% endfor %}