https://github.com/cevich/touchstone
Ansible role to easily make sets of plays, roles or tasks idempotent.
https://github.com/cevich/touchstone
Last synced: about 2 months ago
JSON representation
Ansible role to easily make sets of plays, roles or tasks idempotent.
- Host: GitHub
- URL: https://github.com/cevich/touchstone
- Owner: cevich
- License: gpl-3.0
- Created: 2017-12-05T22:19:05.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-04-10T19:57:58.000Z (about 8 years ago)
- Last Synced: 2025-10-19T09:03:46.031Z (8 months ago)
- Language: Python
- Size: 33.2 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Touchstone
==========
[Ansible Galaxy enabled](https://galaxy.ansible.com/cevich/touchstone/)
role to easily make sets of plays, roles or
tasks idempotent. This is critical for some sequence declarations. For
example if one role does partitioning, and another does formatting.
Re-applying that sequence in the future stands a good chance of wrecking
your data.
Requirements
------------
Same as stock Ansible ``2.3+``
Role Variables
--------------
`touch_touchstone`:
>
> When true, mark the end-state or completion identified by
> `stone_name`.
`stone_name`:
>
> Optional, identification string to use when multiple end-states must
> be tracked. For example multiple playbooks. Defaults to ``.touchstone``.
`touchstone_filepath`:
>
> Optional, directory path where the touchstone will be checked or
> written. Must be a permanent, and writable directory for
> `ansible_user`, i.e. not a `tmpdir` based `/tmp`. A lock file will
> be created/checked in this directory whether or not the touchstone
> is touched.
`stone_touched`:
>
> A boolean value, set during the role to reflect the current
> touchstone state. When `True`, it indicates the stone was touched at
> least once in the past.
`touchstone_template`:
>
> Optional, full path to jinja2 template used for generating the touchstone
> file contents.
Dependencies
------------
A systemd-based machine with a unique /etc/machine-id.
Example Playbook
----------------
- hosts: all
roles:
- role: cevich.touchstone
- role: something
when: not stone_touched
- role: another_thing
when: not stone_touched
- role: final_thing
when: not stone_touched
- role: cevich.touchstone
touch_touchstone: True
License
-------
> Easily make sets of plays, roles or tasks idempotent. Copyright (C)
> 2017 Christopher C. Evich
>
> This program is free software: you can redistribute it and/or modify
> it under the terms of the GNU General Public License as published by
> the Free Software Foundation, either version 3 of the License, or (at
> your option) any later version.
>
> This program is distributed in the hope that it will be useful, but
> WITHOUT ANY WARRANTY; without even the implied warranty of
> MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
> General Public License for more details.
>
> You should have received a copy of the GNU General Public License
> along with this program. If not, see
> .
Author Information
------------------
Causing trouble and inciting mayhem with Linux since Windows 98
Continuous Integration
----------------------
Travis CI: [](https://travis-ci.org/cevich/touchstone)