You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you need (non-default) configuration, please pay attention to the ``pillar.example`` file and/or `Special notes`_ section.
36
+
37
+
Contributing to this repo
38
+
-------------------------
39
+
40
+
**Commit message formatting is significant!!**
41
+
42
+
Please see `How to contribute <https://github.com/saltstack-formulas/.github/blob/master/CONTRIBUTING.rst>`_ for more details.
43
+
44
+
Special notes
45
+
-------------
46
+
47
+
None
13
48
14
49
Available states
15
-
================
50
+
----------------
16
51
17
52
.. contents::
18
-
:local:
53
+
:local:
19
54
20
55
``letsencrypt``
21
-
---------------
56
+
^^^^^^^^^^^^^^^
22
57
23
58
This is a shortcut for letsencrypt.install letsencrypt.config and letsencrypt.domains.
24
59
25
60
If `use_package` is `True` (the default), the formula will try to install the *certbot* package from your Distro's repo.
26
61
Keep in mind that most distros don't have a package available by default: Ie, current Debian (Stretch) requires a backports repo installed.
27
62
Centos 7 requires EPEL, etc. This formula **DOES NOT** manage these repositories. Use the `apt-formula <https://github.com/saltstack-formulas/apt-formula>`_
28
-
or the `epel-formula <https://github.com/saltstack-formulas/epel-formula`_ to manage them.
63
+
or the `epel-formula <https://github.com/saltstack-formulas/epel-formula>`_ to manage them.
29
64
30
65
If `use_package` is `False` it installs and configures the letsencrypt cli from git, creates the requested certificates and installs renewal cron job.
31
66
@@ -37,23 +72,67 @@ If you set `use_package` to `True`, it will:
37
72
systemd's timer unit to renew all the certs)
38
73
* Delete git-based installation's scripts (usually installed under /usr/local/bin) if they still exist declared in
39
74
*letsencrypt*'s pillar.
40
-
* As a safety meassure, if there's an /opt/letsencrypt directory from a git-based installation, it will be left
75
+
* As a safety measure, if there's an /opt/letsencrypt directory from a git-based installation, it will be left
41
76
untouched, but unused.
42
77
To check dependencies to use the package for your distro, check https://certbot.eff.org/all-instructions.
43
78
44
79
``letsencrypt.install``
45
-
-----------------------
80
+
^^^^^^^^^^^^^^^^^^^^^^^
46
81
47
82
Only installs the letsencrypt client (see above).
48
83
49
84
``letsencrypt.config``
50
-
----------------------
85
+
^^^^^^^^^^^^^^^^^^^^^^
51
86
52
87
Manages /etc/letsencrypt/cli.ini config file.
53
88
54
89
``letsencrypt.domains``
55
-
-----------------------
90
+
^^^^^^^^^^^^^^^^^^^^^^^
56
91
57
92
Creates a certificate with the domains in each domain set (letsencrypt:domainsets in pillar). Letsencrypt uses a relatively short validity of 90 days.
58
93
Therefore, a cron job for automatic renewal every 60 days is installed for each domain set as well.
59
94
95
+
Testing
96
+
-------
97
+
98
+
Linux testing is done with ``kitchen-salt``.
99
+
100
+
Requirements
101
+
^^^^^^^^^^^^
102
+
103
+
* Ruby
104
+
* Docker
105
+
106
+
.. code-block:: bash
107
+
108
+
$ gem install bundler
109
+
$ bundle install
110
+
$ bin/kitchen test [platform]
111
+
112
+
Where ``[platform]`` is the platform name defined in ``kitchen.yml``,
113
+
e.g. ``debian-9-2019-2-py3``.
114
+
115
+
``bin/kitchen converge``
116
+
^^^^^^^^^^^^^^^^^^^^^^^^
117
+
118
+
Creates the docker instance and runs the ``template`` main state, ready for testing.
119
+
120
+
``bin/kitchen verify``
121
+
^^^^^^^^^^^^^^^^^^^^^^
122
+
123
+
Runs the ``inspec`` tests on the actual instance.
124
+
125
+
``bin/kitchen destroy``
126
+
^^^^^^^^^^^^^^^^^^^^^^^
127
+
128
+
Removes the docker instance.
129
+
130
+
``bin/kitchen test``
131
+
^^^^^^^^^^^^^^^^^^^^
132
+
133
+
Runs all of the stages above in one go: i.e. ``destroy`` + ``converge`` + ``verify`` + ``destroy``.
134
+
135
+
``bin/kitchen login``
136
+
^^^^^^^^^^^^^^^^^^^^^
137
+
138
+
Gives you SSH access to the instance for manual testing.
0 commit comments