Files
@ 7cabc17c71c3
Branch filter:
Location: majic-ansible-roles/roles/wsgi_website/molecule/default/converge.yml - annotation
7cabc17c71c3
7.1 KiB
text/x-yaml
MAR-218: Quote all octal values in YAML files:
- Fixes linting errors, and ensures there is no ambiguity in case of
YAML specification changes.
- Fixes linting errors, and ensures there is no ambiguity in case of
YAML specification changes.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 | b68d19ad38a3 b68d19ad38a3 b3b33549d7ca b3b33549d7ca b5ed796b566a b68d19ad38a3 b68d19ad38a3 b68d19ad38a3 80299693b896 b68d19ad38a3 b68d19ad38a3 80299693b896 80299693b896 b68d19ad38a3 b68d19ad38a3 cde12eec8256 b68d19ad38a3 b68d19ad38a3 80299693b896 80299693b896 b68d19ad38a3 b68d19ad38a3 b68d19ad38a3 b68d19ad38a3 80299693b896 80299693b896 b68d19ad38a3 b68d19ad38a3 b68d19ad38a3 b68d19ad38a3 b68d19ad38a3 b68d19ad38a3 b68d19ad38a3 b68d19ad38a3 b68d19ad38a3 b68d19ad38a3 b68d19ad38a3 38c3569bdc6a b68d19ad38a3 8944b8348567 8944b8348567 b68d19ad38a3 b68d19ad38a3 b68d19ad38a3 b68d19ad38a3 b68d19ad38a3 b68d19ad38a3 b68d19ad38a3 b5ed796b566a b68d19ad38a3 0bfda9b0c3fe cde12eec8256 cde12eec8256 cde12eec8256 0bfda9b0c3fe cde12eec8256 cde12eec8256 cde12eec8256 cde12eec8256 cde12eec8256 b68d19ad38a3 b68d19ad38a3 19f5f9cab189 7f4f7163ae31 7f4f7163ae31 23bc0fa0d5c7 23bc0fa0d5c7 b68d19ad38a3 b68d19ad38a3 b68d19ad38a3 b5ed796b566a 998aab91d6b4 cde12eec8256 cde12eec8256 cde12eec8256 cde12eec8256 cde12eec8256 cde12eec8256 cde12eec8256 cde12eec8256 cde12eec8256 cde12eec8256 cde12eec8256 cde12eec8256 cde12eec8256 cde12eec8256 998aab91d6b4 998aab91d6b4 7f4f7163ae31 7f4f7163ae31 80299693b896 80299693b896 b68d19ad38a3 b3b33549d7ca b3b33549d7ca b5ed796b566a b68d19ad38a3 b68d19ad38a3 b68d19ad38a3 b68d19ad38a3 b68d19ad38a3 b68d19ad38a3 b68d19ad38a3 b68d19ad38a3 7cabc17c71c3 b68d19ad38a3 b68d19ad38a3 b68d19ad38a3 b68d19ad38a3 b68d19ad38a3 b68d19ad38a3 b68d19ad38a3 b68d19ad38a3 b68d19ad38a3 b68d19ad38a3 7cabc17c71c3 b68d19ad38a3 b68d19ad38a3 b68d19ad38a3 b68d19ad38a3 b68d19ad38a3 b68d19ad38a3 b68d19ad38a3 b68d19ad38a3 7cabc17c71c3 b68d19ad38a3 b68d19ad38a3 b68d19ad38a3 b68d19ad38a3 b68d19ad38a3 b68d19ad38a3 7cabc17c71c3 b68d19ad38a3 b68d19ad38a3 b68d19ad38a3 b68d19ad38a3 b68d19ad38a3 b68d19ad38a3 b68d19ad38a3 b68d19ad38a3 7cabc17c71c3 b68d19ad38a3 b68d19ad38a3 b68d19ad38a3 b68d19ad38a3 b68d19ad38a3 b68d19ad38a3 b68d19ad38a3 b68d19ad38a3 b68d19ad38a3 b68d19ad38a3 7cabc17c71c3 b68d19ad38a3 b68d19ad38a3 b68d19ad38a3 b68d19ad38a3 b68d19ad38a3 b68d19ad38a3 b68d19ad38a3 b68d19ad38a3 7cabc17c71c3 b68d19ad38a3 b68d19ad38a3 b68d19ad38a3 b68d19ad38a3 b68d19ad38a3 b68d19ad38a3 7cabc17c71c3 b68d19ad38a3 b68d19ad38a3 b68d19ad38a3 b68d19ad38a3 b68d19ad38a3 b68d19ad38a3 b68d19ad38a3 b68d19ad38a3 7cabc17c71c3 b68d19ad38a3 b68d19ad38a3 b68d19ad38a3 b68d19ad38a3 b68d19ad38a3 b68d19ad38a3 b68d19ad38a3 b68d19ad38a3 b68d19ad38a3 b68d19ad38a3 7cabc17c71c3 b68d19ad38a3 b68d19ad38a3 b68d19ad38a3 b68d19ad38a3 b68d19ad38a3 b68d19ad38a3 b68d19ad38a3 b68d19ad38a3 b68d19ad38a3 b68d19ad38a3 b68d19ad38a3 b68d19ad38a3 7cabc17c71c3 b68d19ad38a3 b68d19ad38a3 b68d19ad38a3 b68d19ad38a3 b68d19ad38a3 b68d19ad38a3 7cabc17c71c3 b68d19ad38a3 b68d19ad38a3 b68d19ad38a3 b68d19ad38a3 b68d19ad38a3 b68d19ad38a3 b68d19ad38a3 b68d19ad38a3 b68d19ad38a3 b68d19ad38a3 b68d19ad38a3 b68d19ad38a3 b68d19ad38a3 b68d19ad38a3 | ---
- name: Converge
hosts: wsgi-website
become: true
vars:
# common
ca_certificates:
testca: "{{ lookup('file', 'tests/data/x509/ca/level1.cert.pem') }}"
# web_server
default_https_tls_certificate: "{{ lookup('file', 'tests/data/x509/server/wsgi-website_https.cert.pem') }}"
default_https_tls_key: "{{ lookup('file', 'tests/data/x509/server/wsgi-website_https.key.pem') }}"
roles:
- role: wsgi_website
fqdn: parameters-mandatory
https_tls_certificate: "{{ lookup('file', 'tests/data/x509/server/parameters-mandatory_https.cert.pem') }}"
https_tls_key: "{{ lookup('file', 'tests/data/x509/server/parameters-mandatory_https.key.pem') }}"
wsgi_application: testapp:application
- role: wsgi_website
fqdn: parameters-optional.local
https_tls_certificate: "{{ lookup('file', 'tests/data/x509/server/parameters-optional.local_https.cert.pem') }}"
https_tls_key: "{{ lookup('file', 'tests/data/x509/server/parameters-optional.local_https.key.pem') }}"
additional_nginx_config:
- comment: Custom missing page.
value: error_page 404 /my/own/error/page;
admin_uid: 5000
environment_indicator:
background_colour: "#ff0000"
text_colour: "#00ff00"
text: "parameters-optional"
environment_variables:
MY_ENV_VAR: "My environment variable"
packages:
- atftp
- global
http_header_overrides:
Accept-Encoding: ""
rewrites:
- '^/rewrite1/(.*) /rewritten1/ last'
- '^/rewrite2/(.*) /rewritten2/$1 last'
static_locations:
- /static/
- /media/
uid: 5001
use_paste: false
virtualenv_packages:
# Main packages.
- dnspython==2.6.1
- prompt-toolkit==3.0.43
- ptpython==3.0.26
# Dependencies.
- appdirs==1.4.4
- jedi==0.19.1
- parso==0.8.3
- pygments==2.17.2
- wcwidth==0.2.13
website_mail_recipients: user
wsgi_application: testapp:application
wsgi_requirements:
- gunicorn==21.1.0
- packaging==23.2
wsgi_requirements_in:
- gunicorn
- role: wsgi_website
fqdn: parameters-paste-req
use_paste: true
virtualenv_packages:
# Main packages.
- Flask==3.0.2
- Paste==3.7.1
- PasteDeploy==3.1.0
# Dependencies.
- Jinja2==3.1.3
- MarkupSafe==2.1.5
- Werkzeug==3.0.1
- blinker==1.7.0
- click==8.1.7
- importlib-metadata==7.0.1
- itsdangerous==2.1.2
- six==1.16.0
- zipp==3.17.0
wsgi_application: config.ini
wsgi_requirements:
- gunicorn==21.1.0
- packaging==23.2
https_tls_certificate: "{{ lookup('file', 'tests/data/x509/server/parameters-paste-req_https.cert.pem') }}"
https_tls_key: "{{ lookup('file', 'tests/data/x509/server/parameters-paste-req_https.key.pem') }}"
- name: Converge, application
hosts: wsgi-website
become: true
tasks:
# parameters-mandatory application
- name: Set-up directories where application files are hosted at
file:
path: "/var/www/parameters-mandatory/{{ item }}"
state: directory
owner: admin-parameters-mandatory
group: web-parameters-mandatory
mode: "02750"
with_items:
- htdocs/static
- htdocs/media
- code
- name: Deploy WSGI application
copy:
src: "tests/data/python/wsgi/testapp.py"
dest: "/var/www/parameters-mandatory/code/testapp.py"
owner: admin-parameters-mandatory
group: web-parameters-mandatory
mode: "0640"
notify:
- Restart parameters-mandatory
- name: Deploy a static file
copy:
src: "tests/data/static_file.txt"
dest: "/var/www/parameters-mandatory/htdocs/static/static_file.txt"
owner: admin-parameters-mandatory
group: web-parameters-mandatory
mode: "0640"
- name: Deploy a media file
copy:
src: "tests/data/media_file.txt"
dest: "/var/www/parameters-mandatory/htdocs/media/media_file.txt"
owner: admin-parameters-mandatory
group: web-parameters-mandatory
mode: "0640"
# parameters-optional application
- name: Set-up directories where application files are hosted at
file:
path: "/var/www/parameters-optional.local/{{ item }}"
state: directory
owner: admin-parameters-optional_local
group: web-parameters-optional_local
mode: "02750"
with_items:
- htdocs/static
- htdocs/media
- code
- name: Deploy WSGI application
copy:
src: "tests/data/python/wsgi/testapp.py"
dest: "/var/www/parameters-optional.local/code/testapp.py"
owner: admin-parameters-optional_local
group: web-parameters-optional_local
mode: "0640"
notify:
- Restart parameters-optional.local
- name: Deploy a static file
copy:
src: "tests/data/static_file.txt"
dest: "/var/www/parameters-optional.local/htdocs/static/static_file.txt"
owner: admin-parameters-optional_local
group: web-parameters-optional_local
mode: "0640"
- name: Deploy a media file
copy:
src: "tests/data/media_file.txt"
dest: "/var/www/parameters-optional.local/htdocs/media/media_file.txt"
owner: admin-parameters-optional_local
group: web-parameters-optional_local
mode: "0640"
# parameters-paste-req application
- name: Set-up directories where application files are hosted at
file:
path: "/var/www/parameters-paste-req/{{ item }}"
state: directory
owner: admin-parameters-paste-req
group: web-parameters-paste-req
mode: "02750"
with_items:
- htdocs/static
- htdocs/media
- code
- name: Deploy WSGI application
copy:
src: "tests/data/python/paste/{{ item }}"
dest: "/var/www/parameters-paste-req/code/{{ item }}"
owner: admin-parameters-paste-req
group: web-parameters-paste-req
mode: "0640"
with_items:
- config.ini
- testapp.py
- wsgi.py
notify:
- Restart parameters-paste-req
- name: Deploy a static file
copy:
src: "tests/data/static_file.txt"
dest: "/var/www/parameters-paste-req/htdocs/static/static_file.txt"
owner: admin-parameters-paste-req
group: web-parameters-paste-req
mode: "0640"
- name: Deploy a media file
copy:
src: "tests/data/media_file.txt"
dest: "/var/www/parameters-paste-req/htdocs/media/media_file.txt"
owner: admin-parameters-paste-req
group: web-parameters-paste-req
mode: "0640"
handlers:
- name: Restart parameters-mandatory
service:
name: parameters-mandatory
state: restarted
- name: Restart parameters-optional.local
service:
name: parameters-optional.local
state: restarted
- name: Restart parameters-paste-req
service:
name: parameters-paste-req
state: restarted
|