Saltstack Official Linux 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.

31 rinda
651B

  1. {%- from "linux/map.jinja" import system with context %}
  2. {%- if system.enabled %}
  3. {%- if system.console is defined %}
  4. {%- for tty_name, console in system.console.items() %}
  5. {%- if grains.get('init', None) == 'upstart' %}
  6. {{ tty_name }}_service_file:
  7. file.managed:
  8. - name: /etc/init/{{ tty_name }}.conf
  9. - source: salt://linux/files/tty.upstart
  10. - template: jinja
  11. - defaults:
  12. name: {{ tty_name }}
  13. tty: {{ console }}
  14. {%- endif %}
  15. {{ tty_name }}_service:
  16. service.running:
  17. - enable: true
  18. - name: {{ tty_name }}
  19. - watch:
  20. - file: {{ tty_name }}_service_file
  21. {%- endfor %}
  22. {%- endif %}
  23. {%- endif %}