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

README.rst 3.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. .. _readme:
  2. logrotate-formula
  3. =================
  4. |img_travis| |img_sr|
  5. .. |img_travis| image:: https://travis-ci.com/saltstack-formulas/logrotate-formula.svg?branch=master
  6. :alt: Travis CI Build Status
  7. :scale: 100%
  8. :target: https://travis-ci.com/saltstack-formulas/logrotate-formula
  9. .. |img_sr| image:: https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg
  10. :alt: Semantic Release
  11. :scale: 100%
  12. :target: https://github.com/semantic-release/semantic-release
  13. Install and configure logrotate on a machine.
  14. The config files are per OS.
  15. At the moment only Debian, RedHat, Scientific Linux and Archlinux supported with this formula
  16. .. contents:: **Table of Contents**
  17. General notes
  18. -------------
  19. See the full `SaltStack Formulas installation and usage instructions
  20. <https://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html>`_.
  21. If you are interested in writing or contributing to formulas, please pay attention to the `Writing Formula Section
  22. <https://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html#writing-formulas>`_.
  23. If you want to use this formula, please pay attention to the ``FORMULA`` file and/or ``git tag``,
  24. which contains the currently released version. This formula is versioned according to `Semantic Versioning <http://semver.org/>`_.
  25. See `Formula Versioning Section <https://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html#versioning>`_ for more details.
  26. Contributing to this repo
  27. -------------------------
  28. **Commit message formatting is significant!!**
  29. Please see `How to contribute <https://github.com/saltstack-formulas/.github/blob/master/CONTRIBUTING.rst>`_ for more details.
  30. Available states
  31. ----------------
  32. .. contents::
  33. :local:
  34. ``logrotate``
  35. ^^^^^^^^^^^^^
  36. Installs the ``logrotate`` package and service/timer/cron.
  37. ``logrotate.config``
  38. ^^^^^^^^^^^^^^^^^^^^
  39. Manages logrotate config and include dir.
  40. ``logrotate.install``
  41. ^^^^^^^^^^^^^^^^^^^^^
  42. Installs the logrotate package and its dependencies.
  43. ``logrotate.jobs``
  44. ^^^^^^^^^^^^^^^^^^
  45. Create custom job for logrotate.
  46. ``logrotate.service``
  47. ^^^^^^^^^^^^^^^^^^^^^
  48. Manages the startup and running state of the logrotate service.
  49. Testing
  50. -------
  51. Linux testing is done with ``kitchen-salt``.
  52. Requirements
  53. ^^^^^^^^^^^^
  54. * Ruby
  55. * Docker
  56. .. code-block:: bash
  57. $ gem install bundler
  58. $ bundle install
  59. $ bin/kitchen test [platform]
  60. Where ``[platform]`` is the platform name defined in ``kitchen.yml``,
  61. e.g. ``debian-9-2019-2-py3``.
  62. ``bin/kitchen converge``
  63. ^^^^^^^^^^^^^^^^^^^^^^^^
  64. Creates the docker instance and runs the ``logrotate`` main state, ready for testing.
  65. ``bin/kitchen verify``
  66. ^^^^^^^^^^^^^^^^^^^^^^
  67. Runs the ``inspec`` tests on the actual instance.
  68. ``bin/kitchen destroy``
  69. ^^^^^^^^^^^^^^^^^^^^^^^
  70. Removes the docker instance.
  71. ``bin/kitchen test``
  72. ^^^^^^^^^^^^^^^^^^^^
  73. Runs all of the stages above in one go: i.e. ``destroy`` + ``converge`` + ``verify`` + ``destroy``.
  74. ``bin/kitchen login``
  75. ^^^^^^^^^^^^^^^^^^^^^
  76. Gives you SSH access to the instance for manual testing.