Changeset - eba5d5d69e4f
[Not reviewed]
0 6 0
Branko Majic (branko) - 7 years ago 2017-08-08 13:59:04
branko@majic.rs
MAR-114: Moved set_fact for wsgi_website and php_website roles:

- Moved set_fact for setting application admin, user, and home directory into
defaults/main.yml.
- Updated test playbook for wsgi_website to fixate the ptpython and dnspython
versions (including their dependencies).
- Updated tests for wsgi_website to use new fixated versions for ptpython,
dnspython, and their dependencies.
6 files changed with 16 insertions and 17 deletions:
0 comments (0 inline, 0 general)
roles/php_website/defaults/main.yml
Show inline comments
 
@@ -12,4 +12,9 @@ https_tls_certificate: "{{ lookup('file', tls_certificate_dir + '/' + fqdn + '_h
 
https_tls_key: "{{ lookup('file', tls_private_key_dir + '/' + fqdn + '_https.key') }}"
 
additional_fpm_config: {}
 
website_mail_recipients: "root"
 
environment_indicator: null
 
\ No newline at end of file
 
environment_indicator: null
 

	
 
# Internal parameters.
 
admin: "admin-{{ fqdn | replace('.', '_') }}"
 
user: "web-{{ fqdn | replace('.', '_') }}"
 
home: "/var/www/{{ fqdn }}"
roles/php_website/tasks/main.yml
Show inline comments
 
---
 

	
 
- name: Calculate username and home
 
  set_fact:
 
    admin: "admin-{{ fqdn | replace('.', '_') }}"
 
    user: "web-{{ fqdn | replace('.', '_') }}"
 
    home: "/var/www/{{ fqdn }}"
 

	
 
- name: Create PHP website group
 
  group: name="{{ user }}" gid="{{ uid | default(omit) }}" state=present
 

	
roles/wsgi_website/defaults/main.yml
Show inline comments
 
@@ -17,3 +17,8 @@ website_mail_recipients: "root"
 
environment_indicator: null
 
proxy_headers: {}
 
wsgi_requirements: []
 

	
 
# Internal parameters.
 
admin: "admin-{{ fqdn | replace('.', '_') }}"
 
user: "web-{{ fqdn | replace('.', '_') }}"
 
home: "/var/www/{{ fqdn }}"
roles/wsgi_website/playbook.yml
Show inline comments
 
@@ -88,8 +88,9 @@
 
      uid: 5001
 
      use_paste: no
 
      virtualenv_packages:
 
        - dnspython
 
        - ptpython
 
        - dnspython==1.15.0
 
        - ptpython==0.41
 
        - prompt-toolkit==1.0.15
 
      website_mail_recipients: user
 
      wsgi_application: testapp:application
 
      wsgi_requirements: []
roles/wsgi_website/tasks/main.yml
Show inline comments
 
---
 

	
 
- name: Calculate username and home
 
  set_fact:
 
    admin: "admin-{{ fqdn | replace('.', '_') }}"
 
    user: "web-{{ fqdn | replace('.', '_') }}"
 
    home: "/var/www/{{ fqdn }}"
 

	
 
- name: Create WSGI website group
 
  group: name="{{ user }}" gid="{{ uid | default(omit) }}" state=present
 

	
roles/wsgi_website/tests/test_parameters_optional.py
Show inline comments
 
@@ -257,8 +257,8 @@ docopt==0.6.2
 
futures==3.1.0
 
gunicorn==19.7.0
 
jedi==0.10.2
 
prompt-toolkit==1.0.14
 
ptpython==0.39
 
prompt-toolkit==1.0.15
 
ptpython==0.41
 
six==1.10.0
 
wcwidth==0.1.7
 
wsgiref==0.1.2""".lower().split("\n"))
0 comments (0 inline, 0 general)