57 lines
		
	
	
		
			1.2 KiB
		
	
	
	
		
			YAML
		
	
	
			
		
		
	
	
			57 lines
		
	
	
		
			1.2 KiB
		
	
	
	
		
			YAML
		
	
	
| ---
 | |
| - name: Install APT dependencies
 | |
|   apt:
 | |
|     update_cache: true
 | |
|     name:
 | |
|       - uwsgi
 | |
|       - uwsgi-plugin-python3
 | |
|       - python3-django
 | |
|       - python3-django-cas-server
 | |
|       - python3-psycopg2
 | |
|       - python3-ldap3
 | |
|   register: apt_result
 | |
|   retries: 3
 | |
|   until: apt_result is succeeded
 | |
| 
 | |
| - name: Clone Django CAS project repository
 | |
|   git:
 | |
|     repo: '{{ django_cas.repo }}'
 | |
|     dest: '{{ django_cas.path }}'
 | |
|     force: yes
 | |
|     version: master
 | |
|     umask: '002'
 | |
| 
 | |
| - name: Configure Django CAS
 | |
|   template:
 | |
|     src: cas/settings_local.py.j2
 | |
|     dest: '{{ django_cas.path }}/cas/settings_local.py'
 | |
|     mode: 0600
 | |
|     owner: www-data
 | |
|   notify: Restart uwsgi
 | |
| 
 | |
| - name: Configure UWSGI app
 | |
|   template:
 | |
|     src: uwsgi/apps-available/cas.ini.j2
 | |
|     dest: /etc/uwsgi/apps-available/cas.ini
 | |
|     mode: 0644
 | |
|   notify: Restart uwsgi
 | |
| 
 | |
| - name: Enable uwsgi app
 | |
|   file:
 | |
|     src: /etc/uwsgi/apps-available/cas.ini
 | |
|     dest: /etc/uwsgi/apps-enabled/cas.ini
 | |
|     state: link
 | |
|   notify: Restart uwsgi
 | |
| 
 | |
| - name: Install CAS crons
 | |
|   template:
 | |
|     src: cron.d/cas.j2
 | |
|     dest: /etc/cron.d/cas
 | |
|     mode: 0644
 | |
| 
 | |
| - name: Indicate role in motd
 | |
|   template:
 | |
|     src: update-motd.d/05-service.j2
 | |
|     dest: /etc/update-motd.d/05-cas
 | |
|     mode: 0755
 |