generated from genaumann/salt-formula-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: add salt pre test scripts and pillar
- Loading branch information
Showing
8 changed files
with
127 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
--- | ||
{%- set os = grains['os'] | lower %} | ||
{%- set osrelease = grains['osrelease'] | regex_replace('(\.)', '') | lower %} | ||
{%- set release_str = os + osrelease %} | ||
_release_str: {{ release_str }} | ||
acme_sh: | ||
vagrant: | ||
email: [email protected] | ||
certs: | ||
{{ 'acmesh' ~ release_str ~ '.gn98.de' }}: | ||
acme_mode: dns | ||
dns_plugin: dns_hetzner | ||
keysize: '4096' | ||
server: letsencrypt_test | ||
cert_path: /home/vagrant/crt | ||
standalone.gn98.de: | ||
acme_mode: standalone | ||
server: https://localhost:14000/dir | ||
keysize: '2048' | ||
cert_path: /home/vagrant/crt | ||
insecure: true | ||
http_port: '5002' | ||
aliases: | ||
- www.standalone.gn98.de | ||
alpn.gn98.de: | ||
acme_mode: standalone-tls-alpn | ||
http_port: '5001' | ||
server: https://localhost:14000/dir | ||
cert_path: /home/vagrant/crt | ||
insecure: true |
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,29 @@ | ||
--- | ||
docker: | ||
wanted: | ||
- docker | ||
- compose | ||
pkg: | ||
{%- if grains['os'] == 'Rocky' %} | ||
deps: | ||
- python3-pip | ||
- git | ||
- tar | ||
- python3-dnf-plugin-versionlock | ||
{%- elif grains['os'] == "SUSE" %} | ||
deps: | ||
- python3-pip | ||
- python3-docker | ||
- git | ||
- tar | ||
{%- endif %} | ||
docker: | ||
use_upstream: repo | ||
compose: | ||
use_upstream: binary | ||
|
||
compose: | ||
applications: | ||
- pebble | ||
pebble: | ||
path: /opt/pebble/docker-compose.yml |
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,2 @@ | ||
include: | ||
- .pebble |
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,23 @@ | ||
{%- set dns = ['standalone.gn98.de', 'www.standalone.gn98.de', 'alpn.gn98.de'] %} | ||
|
||
pebble_sleep: | ||
module.run: | ||
- test.sleep: | ||
- 15 | ||
|
||
{%- for entry in dns %} | ||
{%- set data = {"host": entry, "addresses": [grains['ipv4'][0]]} %} | ||
pebble_set_dns_{{ entry }}: | ||
http.query: | ||
- name: http://localhost:8055/add-a | ||
- method: POST | ||
- data: '{{ data | json | string }}' | ||
- header_dict: | ||
Content-Type: application/json | ||
- status: 200 | ||
- require: | ||
- module: pebble_sleep | ||
host.present: | ||
- name: {{ entry }} | ||
- ip: {{ grains['ipv4'][0] }} | ||
{%- endfor %} |
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,7 @@ | ||
{%- set release_string = salt['pillar.get']('_release_str') %} | ||
{%- set hetzner_token = salt['environ.get']('HETZNER_TOKEN') %} | ||
|
||
{%- do salt['environ.setenv']( | ||
{'ACMESH_vagrant_acmesh' ~ release_string ~ 'Gn98De_HETZNER_Token': hetzner_token} | ||
) | ||
%} |
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,4 @@ | ||
pebble_clone: | ||
git.cloned: | ||
- name: https://github.com/letsencrypt/pebble | ||
- target: /opt/pebble |
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,17 @@ | ||
{%- set pkgs = ['socat'] %} | ||
|
||
pkg_pre-install: | ||
pkg.installed: | ||
- pkgs: {{ pkgs }} | ||
|
||
pkg_install_docker_pip: | ||
pip.installed: | ||
- name: docker <= 6.1.3 # see https://github.com/geerlingguy/internet-pi/issues/567 | ||
- reload_modules: True | ||
|
||
pkg_install_docker-compose_pip: | ||
pip.installed: | ||
- name: docker-compose | ||
- extra_args: | ||
- --no-build-isolation # see https://stackoverflow.com/questions/76708329/docker-compose-no-longer-building-image-attributeerror-cython-sources | ||
- reload_modules: True |