diff options
author | Christian Pointner <equinox@spreadspace.org> | 2023-08-08 22:53:44 +0200 |
---|---|---|
committer | Christian Pointner <equinox@spreadspace.org> | 2023-08-20 22:12:03 +0200 |
commit | cd5caaacc021b59b74a80b284574db166a15c6b5 (patch) | |
tree | f3b44e35ed93dc72373ce6a6b65d74dde221e037 /dan/sk-testvm.yml | |
parent | make acmetool cert role more generic (WIP - needs more testing) (diff) |
prepare test setups for new acme/cert roles
Diffstat (limited to 'dan/sk-testvm.yml')
-rw-r--r-- | dan/sk-testvm.yml | 77 |
1 files changed, 75 insertions, 2 deletions
diff --git a/dan/sk-testvm.yml b/dan/sk-testvm.yml index 93e20776..658b5ac4 100644 --- a/dan/sk-testvm.yml +++ b/dan/sk-testvm.yml @@ -11,6 +11,79 @@ - name: Payload Setup hosts: sk-testvm roles: -# - role: x509/acmetool/base -# - role: x509/uacme/base + #- role: x509/acmetool/base + #- role: x509/uacme/base - role: nginx/base + post_tasks: + - name: make sure document root directories exist + loop: + - test + - default + file: + path: "/var/www/{{ item }}" + state: directory + + - name: install index.html for default server + copy: + dest: /var/www/default/index.html + content: | + <html> + <head> + <title>No Such Site</title> + </head> + <body style="font-family: Helvetica, Arial, Sans-Serif; color: white; background: black;"> + <div style="text-align: center; margin-top: 4em; margin-left:auto; margin-right:auto;"> + <h2 style="">You have reached testvm.elev8.at, nothing to see here.</h2> + </div> + </body> + </html> + + - name: install default vhost + vars: + nginx_vhost: + default: yes + name: nosuchsite + template: generic + #acme: yes + hostnames: + - testvm.elev8.at + locations: + '/': + root: /var/www/default + index: index.html + include_role: + name: nginx/vhost + + + - name: install index.html for test server + copy: + dest: /var/www/test/index.html + content: | + <html> + <head> + <title>This is Test</title> + </head> + <body style="font-family: Helvetica, Arial, Sans-Serif; color: white; background: black;"> + <div style="text-align: center; margin-top: 4em; margin-left:auto; margin-right:auto;"> + <h2 style="">If you can read this the test was successful.</h2> + </div> + </body> + </html> + + - name: install test vhost + vars: + nginx_vhost: + name: test + template: generic + #acme: yes + hostnames: + - test.spreadspace.org + - test.spreadspace.com + - test.spreadspace.net + - test.spreadspace.systems + locations: + '/': + root: /var/www/test + index: index.html + include_role: + name: nginx/vhost |