diff options
author | Jonas Gunz <himself@jonasgunz.de> | 2023-09-01 01:27:09 +0200 |
---|---|---|
committer | Jonas Gunz <himself@jonasgunz.de> | 2023-09-01 01:27:09 +0200 |
commit | 347803f5a811972c719b09999d4d2b5e9e32e3eb (patch) | |
tree | cd7c5705426ae0ff8a41e84418c5407fbc1ec810 /roles/nginx/Readme.md | |
parent | 7ad67630c40c0669cc1c140ff2d42311fb780b47 (diff) | |
download | ansible_collection-347803f5a811972c719b09999d4d2b5e9e32e3eb.tar.gz |
new nginx role
Diffstat (limited to 'roles/nginx/Readme.md')
-rw-r--r-- | roles/nginx/Readme.md | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/roles/nginx/Readme.md b/roles/nginx/Readme.md new file mode 100644 index 0000000..d9d648d --- /dev/null +++ b/roles/nginx/Readme.md @@ -0,0 +1,34 @@ +# nginx + +Simple role for configuring nginx servers. +The yaml keys and values are converted to raw nginx files. +See example + +```yml +--- +nginx: + servers: + default: + listen: 443 ssl + server_name: '{{ ansible_facts.fqdn }}' + ssl_certificate: '/etc/ssl/certs/{{ ansible_facts.fqdn }}.pem' + ssl_certificate_key: '/etc/ssl/private/{{ ansible_facts.fqdn }}.key' + 'location /': + proxy_pass: http://localhost:8080 +``` + +Produces + +```nginx +# vi: ft=nginx +# This file is managed by Ansible. DO NOT CHANGE! +server { + listen 443 ssl; + server_name hostname; + ssl_certificate /etc/ssl/certs/hostname.pem; + ssl_certificate_key /etc/ssl/private/hostname.key; + location / { + proxy_pass http://localhost:8080; + } +} +``` |