forked from martinhoefling/letsencrypt-formula
-
Notifications
You must be signed in to change notification settings - Fork 150
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Offer alternative method of installing certbot with pip. Currently untested on most supported platforms.
- Loading branch information
Xeryus Stokkel
committed
Aug 2, 2021
1 parent
852f110
commit 756a272
Showing
10 changed files
with
160 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# InSpec Profile: `git` | ||
|
||
This shows the implementation of the `pip` InSpec [profile](https://github.com/inspec/inspec/blob/master/docs/profiles.md). | ||
|
||
## Verify a profile | ||
|
||
InSpec ships with built-in features to verify a profile structure. | ||
|
||
```bash | ||
$ inspec check git | ||
Summary | ||
------- | ||
Location: git | ||
Profile: profile | ||
Controls: 4 | ||
Timestamp: 2019-06-24T23:09:01+00:00 | ||
Valid: true | ||
|
||
Errors | ||
------ | ||
|
||
Warnings | ||
-------- | ||
``` | ||
|
||
## Execute a profile | ||
|
||
To run all **supported** controls on a local machine use `inspec exec /path/to/profile`. | ||
|
||
```bash | ||
$ inspec exec git | ||
.. | ||
|
||
Finished in 0.0025 seconds (files took 0.12449 seconds to load) | ||
8 examples, 0 failures | ||
``` | ||
|
||
## Execute a specific control from a profile | ||
|
||
To run one control from the profile use `inspec exec /path/to/profile --controls name`. | ||
|
||
```bash | ||
$ inspec exec git --controls package | ||
. | ||
|
||
Finished in 0.0025 seconds (files took 0.12449 seconds to load) | ||
1 examples, 0 failures | ||
``` | ||
|
||
See an [example control here](https://github.com/inspec/inspec/blob/master/examples/profile/controls/example.rb). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# frozen_string_literal: true | ||
|
||
describe file('/opt/letsencrypt') do | ||
it { should be_directory } | ||
it { should be_owned_by 'root' } | ||
it { should be_grouped_into 'root' } | ||
it { should be_readable } | ||
its('size') { should be > 25 } | ||
end | ||
|
||
describe file('/etc/letsencrypt/cli.ini') do | ||
it { should be_file } | ||
it { should be_owned_by 'root' } | ||
it { should be_grouped_into 'root' } | ||
it { should be_readable } | ||
its('size') { should be > 1 } | ||
its('content') do | ||
should match 'server = https://acme-staging.api.letsencrypt.org/directory' | ||
end | ||
its('content') { should match 'authenticator = standalone' } | ||
its('content') { should match 'File managed by Salt' } | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# -*- coding: utf-8 -*- | ||
# vim: ft=yaml | ||
--- | ||
name: pip | ||
title: letsencrypt formula | ||
maintainer: SaltStack Formulas | ||
license: Apache-2.0 | ||
# yamllint disable-line rule:line-length | ||
summary: Verify that the letsencrypt formula is setup and configured correctly using `pip` | ||
depends: | ||
- name: share | ||
path: test/integration/share | ||
supports: | ||
- platform-name: debian | ||
- platform-name: ubuntu | ||
- platform-name: centos | ||
- platform-name: fedora | ||
- platform-name: opensuse | ||
- platform-name: suse | ||
- platform-name: freebsd | ||
- platform-name: openbsd | ||
- platform-name: amazon | ||
- platform-name: oracle | ||
- platform-name: arch | ||
- platform-name: gentoo | ||
- platform-name: almalinux | ||
- platform-name: rocky | ||
- platform: windows |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# -*- coding: utf-8 -*- | ||
# vim: ft=yaml | ||
--- | ||
letsencrypt: | ||
install_method: pip | ||
version: 0.26.1 | ||
config: | | ||
server = https://acme-staging.api.letsencrypt.org/directory | ||
email = saltstack-letsencrypt-formula@example.com | ||
authenticator = standalone | ||
agree-tos = True | ||
renew-by-default = True | ||
domainsets: | ||
www: | ||
- letsencrypt-formula.example.com |