diff options
Diffstat (limited to 'dan')
-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 |