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

46 líneas
1.5KB

  1. {%- from "linux/map.jinja" import system with context %}
  2. {%- if system.enabled %}
  3. {%- if system.shell is defined %}
  4. {%- if system.shell.umask is defined %}
  5. etc_bash_bashrc_umask:
  6. file.blockreplace:
  7. - name: /etc/bash.bashrc
  8. - marker_start: "# BEGIN CIS 5.4.4 default user umask"
  9. - marker_end: "# END CIS 5.4.4 default user umask"
  10. - content: "umask {{ system.shell.umask }}"
  11. - append_if_not_found: True
  12. - onlyif: test -f /etc/bash.bashrc
  13. etc_profile_umask:
  14. file.blockreplace:
  15. - name: /etc/profile
  16. - marker_start: "# BEGIN CIS 5.4.4 default user umask"
  17. - marker_end: "# END CIS 5.4.4 default user umask"
  18. - content: "umask {{ system.shell.umask }}"
  19. - append_if_not_found: True
  20. - onlyif: test -f /etc/profile
  21. {%- endif %}
  22. {%- if system.shell.timeout is defined %}
  23. etc_bash_bashrc_timeout:
  24. file.blockreplace:
  25. - name: /etc/bash.bashrc
  26. - marker_start: "# BEGIN CIS 5.4.5 default user shell timeout"
  27. - marker_end: "# END CIS 5.4.5 default user shell timeout"
  28. - content: "TMOUT={{ system.shell.timeout }}"
  29. - append_if_not_found: True
  30. - onlyif: test -f /etc/bash.bashrc
  31. etc_profile_timeout:
  32. file.blockreplace:
  33. - name: /etc/profile
  34. - marker_start: "# BEGIN CIS 5.4.5 default user shell timeout"
  35. - marker_end: "# END CIS 5.4.5 default user shell timeout"
  36. - content: "TMOUT={{ system.shell.timeout }}"
  37. - append_if_not_found: True
  38. - onlyif: test -f /etc/profile
  39. {%- endif %}
  40. {%- endif %}
  41. {%- endif %}