mirror of
https://github.com/saltstack-formulas/cron-formula.git
synced 2024-11-30 20:05:14 +01:00
41cca8a03e
## [0.2.4](https://github.com/saltstack-formulas/cron-formula/compare/v0.2.3...v0.2.4) (2019-10-23) ### Bug Fixes * **saltcheck:** fix broken import and standardise across test files ([](https://github.com/saltstack-formulas/cron-formula/commit/7911b71)) * **saltcheck:** fix invalid `service` test ([](https://github.com/saltstack-formulas/cron-formula/commit/677c956)) * **saltcheck:** remove trailing spaces ([](https://github.com/saltstack-formulas/cron-formula/commit/aada0ae)) * **saltcheck:** replace `map.jinja` references with InSpec conditionals ([](https://github.com/saltstack-formulas/cron-formula/commit/7e9e619)) * **saltcheck:** update for `cron` instead of `cron_settings` ([](https://github.com/saltstack-formulas/cron-formula/commit/26cfa4f)) ### Code Refactoring * **config:** minimise and standardise between `.sls` & `.tst` ([](https://github.com/saltstack-formulas/cron-formula/commit/18585bd)) * **config:** remove duplication in using a loop ([](https://github.com/saltstack-formulas/cron-formula/commit/652ebff)) * **jinja:** used shortened form of `|default` filter ([](https://github.com/saltstack-formulas/cron-formula/commit/a0f891e)) * **saltcheck:** relocate `.tst` files according to 1:1 `.sls` files ([](https://github.com/saltstack-formulas/cron-formula/commit/ee65236)), closes [/github.com/saltstack-formulas/cron-formula/pull/4#issuecomment-544140377](https://github.com//github.com/saltstack-formulas/cron-formula/pull/4/issues/issuecomment-544140377) * **saltcheck:** use `package.tst` instead of `install.tst` ([](https://github.com/saltstack-formulas/cron-formula/commit/d2c9544)) * **saltcheck:** use root-level `saltcheck-tests` directory ([](https://github.com/saltstack-formulas/cron-formula/commit/6e54c3f)) ### Continuous Integration * **travis:** obtain `saltcheck.py` and run the tests (only on `develop`) ([](https://github.com/saltstack-formulas/cron-formula/commit/8ae46e5)) * **travis:** run `salt-lint` for `.tst` files as well ([](https://github.com/saltstack-formulas/cron-formula/commit/baab964)) * **travis:** standardise `saltcheck` comments ([](https://github.com/saltstack-formulas/cron-formula/commit/e23276b)) * **travis:** update `salt-lint` config for `v0.0.10` [skip ci] ([](https://github.com/saltstack-formulas/cron-formula/commit/b701d79)) ### Styles * **config.tst:** rearrange Jinja statements for clarity ([](https://github.com/saltstack-formulas/cron-formula/commit/8abec54)) * **saltcheck:** merge `absent` & `present` into one `if` block ([](https://github.com/saltstack-formulas/cron-formula/commit/33f344c)) * **saltcheck:** use consistent order of assertions ([](https://github.com/saltstack-formulas/cron-formula/commit/88229f0)) ### Tests * **pillar:** add test for `commented` and clarify each test ([](https://github.com/saltstack-formulas/cron-formula/commit/3d0dcb2)) * **pillar:** ensure `special` is being tested as well ([](https://github.com/saltstack-formulas/cron-formula/commit/951a959)) * **saltcheck:** add first tests ([](https://github.com/saltstack-formulas/cron-formula/commit/9847aff)) * **saltcheck:** add support for `random` values ([](https://github.com/saltstack-formulas/cron-formula/commit/007970f)) * **saltcheck:** add test for `service.available` ([](https://github.com/saltstack-formulas/cron-formula/commit/226eb88)) * **saltcheck:** add test for `service.running` ([](https://github.com/saltstack-formulas/cron-formula/commit/5cdc50f)) * **saltcheck:** avoid `map.jinja`, use the test pillar instead ([](https://github.com/saltstack-formulas/cron-formula/commit/cce5e67)) * **saltcheck:** fix `config` tests ([](https://github.com/saltstack-formulas/cron-formula/commit/9225b18)) * **saltcheck:** remove duplication in `config.tst` using a loop ([](https://github.com/saltstack-formulas/cron-formula/commit/72281c7)) * **saltcheck:** test for `commented` and not `commented` ([](https://github.com/saltstack-formulas/cron-formula/commit/5070611)) * **saltcheck:** test for `special` in `config.tst` as well ([](https://github.com/saltstack-formulas/cron-formula/commit/6f2b323)) * **saltcheck:** use local `map.jinja` to workaround missing `tpldata` ([](https://github.com/saltstack-formulas/cron-formula/commit/8845b3c)) |
||
---|---|---|
.. | ||
AUTHORS.rst | ||
CHANGELOG.rst | ||
README.rst |
.. _readme: cron-formula ============ |img_travis| |img_sr| .. |img_travis| image:: https://travis-ci.com/saltstack-formulas/cron-formula.svg?branch=master :alt: Travis CI Build Status :scale: 100% :target: https://travis-ci.com/saltstack-formulas/cron-formula .. |img_sr| image:: https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg :alt: Semantic Release :scale: 100% :target: https://github.com/semantic-release/semantic-release Formula to set up and configure cron. .. contents:: **Table of Contents** General notes ------------- See the full `SaltStack Formulas installation and usage instructions <https://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html>`_. If you are interested in writing or contributing to formulas, please pay attention to the `Writing Formula Section <https://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html#writing-formulas>`_. If you want to use this formula, please pay attention to the ``FORMULA`` file and/or ``git tag``, which contains the currently released version. This formula is versioned according to `Semantic Versioning <http://semver.org/>`_. See `Formula Versioning Section <https://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html#versioning>`_ for more details. Contributing to this repo ------------------------- **Commit message formatting is significant!!** Please see `How to contribute <https://github.com/saltstack-formulas/.github/blob/master/CONTRIBUTING.rst>`_ for more details. Available states ---------------- .. contents:: :local: ``cron`` ^^^^^^^^ Installs and configures the cron package. ``cron.package`` ^^^^^^^^^^^^^^^^ Installs the cron package. ``cron.config`` ^^^^^^^^^^^^^^^ This state manages the file ``cron.conf`` under ``/etc/cron`` (template found in "cron/files"). The configuration is populated by values in "cron/map.jinja" based on the package's default values (and RedHat, Debian, Suse and Arch family distribution specific values), which can then be overridden by values of the same name in pillar. ``cron.service`` ^^^^^^^^^^^^^^^^ Manage the ``cron`` service. Stopping or starting it. If needed, you can disable the cron service by setting the ``enabled: false`` option in the pillar. Testing ------- Linux testing is done with ``kitchen-salt``. Requirements ^^^^^^^^^^^^ * Ruby * Docker .. code-block:: bash $ gem install bundler $ bundle install $ bin/kitchen test [platform] Where ``[platform]`` is the platform name defined in ``kitchen.yml``, e.g. ``debian-9-2019-2-py3``. ``bin/kitchen converge`` ^^^^^^^^^^^^^^^^^^^^^^^^ Creates the docker instance and runs the ``cron`` main state, ready for testing. ``bin/kitchen verify`` ^^^^^^^^^^^^^^^^^^^^^^ Runs the ``inspec`` tests on the actual instance. ``bin/kitchen destroy`` ^^^^^^^^^^^^^^^^^^^^^^^ Removes the docker instance. ``bin/kitchen test`` ^^^^^^^^^^^^^^^^^^^^ Runs all of the stages above in one go: i.e. ``destroy`` + ``converge`` + ``verify`` + ``destroy``. ``bin/kitchen login`` ^^^^^^^^^^^^^^^^^^^^^ Gives you SSH access to the instance for manual testing.