Skip to content
This repository was archived by the owner on May 10, 2019. It is now read-only.

Commit 35aef5e

Browse files
committed
Rework role
1 parent a40af61 commit 35aef5e

14 files changed

+178
-103
lines changed

Diff for: .gitignore

+5
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,8 @@ docs/Makefile
44
docs/_build/
55
docs/conf.py
66
docs/defaults.rst
7+
docs/includes/global.rst
8+
docs/_static/.gitkeep
9+
docs/_static/custom.css
10+
docs/_templates/.gitkeep
11+
docs/_templates/page.html

Diff for: .travis.yml

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
3+
sudo: required
4+
dist: trusty
5+
6+
language: 'python'
7+
python: '2.7'
8+
9+
virtualenv:
10+
system_site_packages: true
11+
12+
before_install: True
13+
install: True
14+
15+
script:
16+
- 'git clone --depth 1 https://github.com/nickjj/rolespec'
17+
- 'cd rolespec ; bin/rolespec -r https://github.com/debops/test-suite'
18+
19+
notifications:
20+
webhooks:
21+
- 'https://galaxy.ansible.com/api/v1/notifications/'

Diff for: CHANGES.rst

+29-15
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,54 @@
11
Changelog
22
=========
33

4-
v0.1.0
5-
------
4+
.. include:: includes/all.rst
65

7-
*Unreleased*
6+
**debops-contrib.snapshot_snapper**
87

9-
- Initial release. [ypid]
8+
This project adheres to `Semantic Versioning <http://semver.org/spec/v2.0.0.html>`__
9+
and `human-readable changelog <http://keepachangelog.com/en/0.3.0/>`__.
1010

11-
- Wrote initial documentation. [ypid]
11+
The current role maintainer_ is ypid_.
12+
13+
14+
debops-contrib.snapshot_snapper v0.1.0 - unreleased
15+
---------------------------------------------------
16+
17+
Added
18+
~~~~~
19+
20+
- Initial coding and design. [ypid_]
21+
22+
- Wrote initial documentation. [ypid_]
23+
24+
- Implemented automatic reinitialization of volume snapshots after a volume
25+
has been reformatted. [ypid_]
26+
27+
Changed
28+
~~~~~~~
1229

1330
- Moved to `DebOps Contrib`_ (the role is still available under
14-
`ypid.snapshot_snapper`_ until it has been fully renamed). [ypid]
31+
``ypid.snapshot_snapper`` until it has been fully renamed). [ypid_]
1532

1633
- Changed namespace from ``snapshot_snapper_`` to ``snapshot_snapper__``.
1734
``snapshot_snapper_[^_]`` variables are hereby deprecated and you might need
1835
to update your inventory. This oneliner might come in handy to do this.
1936

20-
.. code:: shell
37+
.. code-block:: shell
2138
2239
git ls-files -z | find -type f -print0 | xargs --null sed --in-place --regexp-extended 's/(snapshot_snapper)_([^_])/\1__\2/g'
2340
24-
[ypid]
41+
[ypid_]
2542

2643
- Use the `loop control feature <https://docs.ansible.com/ansible/playbooks_loops.html>`_
27-
of Ansible 2.1 and thus require Ansible 2.1. [ypid]
28-
29-
- Implemented automatic reinitialization of volume snapshots after a volume
30-
has been reformatted. [ypid]
44+
of Ansible 2.1 and thus require Ansible 2.1. [ypid_]
3145

32-
.. _ypid.snapshot_snapper: https://galaxy.ansible.com/ypid/snapshot_snapper/
33-
.. _DebOps Contrib: https://github.com/debops-contrib/
46+
Fixed
47+
~~~~~
3448

3549
- Fixed recognition of empty ``SNAPPER_CONFIGS`` set in
3650
:file:`/etc/default/snapper` and don’t write a second ``SNAPPER_CONFIGS``
3751
variable in this case.
3852
Previous to this fix, snapshots where not automatically created because a
3953
second ``SNAPPER_CONFIGS`` (empty) set was added to the file.
40-
[ypid]
54+
[ypid_]

Diff for: COPYRIGHT

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
debops-contrib.snapshot_snapper - Configure snapshots with snapper
2+
3+
Copyright (C) 2015-2016 Robin Schneider <[email protected]>
4+
Copyright (C) 2016 DebOps https://debops.org/
5+
6+
This Ansible role is part of DebOps.
7+
8+
DebOps is free software; you can redistribute it and/or modify
9+
it under the terms of the GNU General Public License version 3, as
10+
published by the Free Software Foundation.
11+
12+
DebOps is distributed in the hope that it will be useful,
13+
but WITHOUT ANY WARRANTY; without even the implied warranty of
14+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15+
GNU General Public License for more details.
16+
17+
You should have received a copy of the GNU General Public License
18+
along with DebOps. If not, see https://www.gnu.org/licenses/.

Diff for: LICENSE

-1
Original file line numberDiff line numberDiff line change
@@ -672,4 +672,3 @@ may consider it more useful to permit linking proprietary applications with
672672
the library. If this is what you want to do, use the GNU Lesser General
673673
Public License instead of this License. But first, please read
674674
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
675-

Diff for: README.md

+12-10
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1-
## [![DebOps project](http://debops.org/images/debops-small.png)](http://debops.org) contrib-snapshot_snapper
1+
## [![DebOps](https://debops.org/images/debops-small.png)](https://debops.org) snapshot_snapper
22

33
<!-- This file was generated by Ansigenome. Do not edit this file directly but
44
instead have a look at the files in the ./meta/ directory. -->
55

6-
[![Ansible Galaxy](http://img.shields.io/badge/galaxy-debops-contrib.-snapshot_snapper-660198.svg?style=flat)](https://galaxy.ansible.com/detail#/role/3042)
6+
[![Travis CI](https://img.shields.io/travis/debops-contrib/ansible-snapshot_snapper.svg?style=flat)](https://travis-ci.org/debops-contrib/ansible-snapshot_snapper)
7+
[![test-suite](https://img.shields.io/badge/test--suite-ansible--snapshot__snapper-blue.svg?style=flat)](https://github.com/debops/test-suite/tree/master/ansible-snapshot_snapper/)
8+
[![Ansible Galaxy](https://img.shields.io/badge/galaxy-debops--contrib.snapshot_snapper-660198.svg?style=flat)](https://galaxy.ansible.com/ypid/snapshot_snapper)
79

810

911
Snapper can manage snapshots for the following filesystems and volume managers:
@@ -16,16 +18,17 @@ This role allows to setup and configure snapper with Ansible.
1618

1719
### Installation
1820

19-
This role requires at least Ansible `v2.1.0`. To install it, run:
21+
This role requires at least Ansible `v2.1.3`. To install it, run:
2022

2123
```Shell
2224
ansible-galaxy install debops-contrib.snapshot_snapper
2325
```
2426

2527
### Documentation
2628

29+
<!-- FIXME: Change to the canonical URL when it has been setup. https://github.com/debops/docs/issues/111 -->
2730
More information about `debops-contrib.snapshot_snapper` can be found in the
28-
[official debops-contrib.snapshot_snapper documentation](http://docs.debops.org/en/latest/ansible/roles/ansible-contrib-snapshot_snapper/docs/).
31+
[official debops-contrib.snapshot_snapper documentation](https://debops-contrib.readthedocs.io/en/latest/ansible/roles/ansible-snapshot_snapper/docs/).
2932

3033

3134

@@ -35,20 +38,19 @@ You may need to include missing roles from the [DebOps common
3538
playbook](https://github.com/debops/debops-playbooks/blob/master/playbooks/common.yml)
3639
into your playbook.
3740

38-
[Try DebOps now](https://github.com/debops/debops) for a complete solution to run your Debian-based infrastructure.
41+
[Try DebOps now](https://debops.org/) for a complete solution to run your Debian-based infrastructure.
3942

4043

4144

4245

4346

4447
### Authors and license
4548

46-
`contrib-snapshot_snapper` role was written by:
49+
- [Robin Schneider](https://docs.debops.org/en/latest/debops-keyring/docs/entities.html#debops-keyring-entity-ypid) (maintainer) | [e-mail](mailto:[email protected]) | [GitHub](https://github.com/ypid)
4750

48-
- [Robin Schneider](https://github.com/ypid) | [e-mail](mailto:[email protected])
49-
50-
License: [GPLv3](https://tldrlegal.com/license/gnu-general-public-license-v3-%28gpl-3%29)
51+
License: [GPL-3.0](https://tldrlegal.com/license/gnu-general-public-license-v3-%28gpl-3%29)
5152

5253
***
5354

54-
This role is part of the [DebOps](http://debops.org/) project. README generated by [ansigenome](https://github.com/nickjj/ansigenome/).
55+
This role is part of [DebOps Contrib](https://github.com/debops-contrib/debops-contrib). README generated by [ansigenome](https://github.com/nickjj/ansigenome/).
56+
<!-- Ansigenome sources: https://github.com/ypid/ypid-ansible-common/tree/master/template_READMEs/debops-contrib -->

Diff for: defaults/main.yml

+39-35
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,37 @@
11
---
22
# .. vim: foldmarker=[[[,]]]:foldmethod=marker
33

4-
# Default variables
5-
# =================
4+
# debops-contrib.snapshot_snapper default variables [[[
5+
# =====================================================
66

77
# .. contents:: Sections
88
# :local:
99
#
10-
# ---------------------
11-
# Required packages [[[1
10+
# .. include:: includes/all.rst
11+
12+
13+
# Required packages [[[
1214
# ---------------------
1315

14-
# .. envvar:: snapshot_snapper__base_packages
16+
# .. envvar:: snapshot_snapper__base_packages [[[
1517
#
1618
# List of base packages to install.
1719
snapshot_snapper__base_packages:
1820
- 'snapper'
19-
20-
21-
# ---------------------
22-
# Snapper templates [[[1
21+
# ]]]
22+
# ]]]
23+
# Snapper templates [[[
2324
# ---------------------
2425

25-
# .. envvar:: snapshot_snapper__templates
26+
# .. envvar:: snapshot_snapper__templates [[[
2627
#
2728
# Sets the global default settings for snapper. If empty, the default of snapper
2829
# will be left unchanged.
2930
#
3031
# Example:
3132
#
32-
# .. code::
33+
# .. code-block:: yaml
34+
# :linenos:
3335
#
3436
# snapshot_snapper__templates:
3537
# default:
@@ -40,24 +42,23 @@ snapshot_snapper__base_packages:
4042
#
4143
snapshot_snapper__templates: {}
4244

43-
44-
# .. envvar:: snapshot_snapper__host_group_templates
45+
# ]]]
46+
# .. envvar:: snapshot_snapper__host_group_templates [[[
4547
#
4648
# Sets the host group default settings for snapper.
4749
snapshot_snapper__host_group_templates: {}
4850

49-
50-
# .. envvar:: snapshot_snapper__host_templates
51+
# ]]]
52+
# .. envvar:: snapshot_snapper__host_templates [[[
5153
#
5254
# Sets the host default settings for snapper.
5355
snapshot_snapper__host_templates: {}
54-
55-
56-
# ------------------------
57-
# Volume configuration [[[1
56+
# ]]]
57+
# ]]]
58+
# Volume configuration [[[
5859
# ------------------------
5960

60-
# .. envvar:: snapshot_snapper__volumes
61+
# .. envvar:: snapshot_snapper__volumes [[[
6162
#
6263
# "Global" list of volumes to snapshot.
6364
#
@@ -81,7 +82,8 @@ snapshot_snapper__host_templates: {}
8182
#
8283
# Example:
8384
#
84-
# .. code::
85+
# .. code-block:: yaml
86+
# :linenos:
8587
#
8688
# snapshot_snapper__volumes:
8789
# - path: '/'
@@ -93,20 +95,20 @@ snapshot_snapper__host_templates: {}
9395
#
9496
snapshot_snapper__volumes: []
9597

96-
97-
# .. envvar:: snapshot_snapper__host_group_volumes
98+
# ]]]
99+
# .. envvar:: snapshot_snapper__host_group_volumes [[[
98100
#
99101
# "Host group" list of volumes to snapshot.
100102
snapshot_snapper__host_group_volumes: []
101103

102-
103-
# .. envvar:: snapshot_snapper__host_volumes
104+
# ]]]
105+
# .. envvar:: snapshot_snapper__host_volumes [[[
104106
#
105107
# "Host" list of volumes to snapshot.
106108
snapshot_snapper__host_volumes: []
107109

108-
109-
# .. envvar:: snapshot_snapper__auto_reinit
110+
# ]]]
111+
# .. envvar:: snapshot_snapper__auto_reinit [[[
110112
#
111113
# Automatically reinitialize the snapshots for a volume if the directory
112114
# containing the actual snapshots has vanished.
@@ -118,22 +120,24 @@ snapshot_snapper__host_volumes: []
118120
# When this option is set to ``True``, the role will do some manually
119121
# intervention to automatically fix this if necessary.
120122
snapshot_snapper__auto_reinit: True
121-
122-
123-
# -------------------------------
124-
# Role internal configuration [[[1
123+
# ]]]
124+
# ]]]
125+
# Role internal configuration [[[
125126
# -------------------------------
126127

127-
# .. envvar:: snapshot_snapper__directory
128+
# .. envvar:: snapshot_snapper__directory [[[
128129
#
129130
# Name of the directory in the root of the volume containing the snapshots and
130131
# metadata.
131132
snapshot_snapper__directory: '.snapshots'
132133

133-
134-
# .. envvar:: snapshot_snapper__divert_files
134+
# ]]]
135+
# .. envvar:: snapshot_snapper__divert_files [[[
135136
#
137+
# List of files which the role will divert.
136138
snapshot_snapper__divert_files:
137139
- '/etc/updatedb.conf'
138140
- '/etc/snapper/config-templates/default'
139-
141+
# ]]]
142+
# ]]]
143+
# ]]]

Diff for: docs/copyright.rst

+1-16
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,4 @@
11
Copyright
22
=========
33

4-
::
5-
6-
Copyright (C) 2015-2016 Robin Schneider <[email protected]>
7-
Copyright (C) 2016 DebOps Project http://debops.org/
8-
9-
This program is free software; you can redistribute it and/or modify
10-
it under the terms of the GNU General Public License version 3, as
11-
published by the Free Software Foundation.
12-
13-
This program is distributed in the hope that it will be useful, but
14-
WITHOUT ANY WARRANTY; without even the implied warranty of
15-
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16-
General Public License for more details.
17-
18-
You should have received a copy of the GNU General Public License
19-
along with this program. If not, see https://www.gnu.org/licenses/
4+
.. literalinclude:: ../COPYRIGHT

0 commit comments

Comments
 (0)