Saltstack Official Linux Formula
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

console.sls 651B

123456789101112131415161718192021222324252627282930
  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 %}