78 lines
		
	
	
		
			1.7 KiB
		
	
	
	
		
			YAML
		
	
	
			
		
		
	
	
			78 lines
		
	
	
		
			1.7 KiB
		
	
	
	
		
			YAML
		
	
	
| ---
 | |
| - name: Install re2o dependencies
 | |
|   apt:
 | |
|     update_cache: true
 | |
|     name:
 | |
|       - python3-dateutil
 | |
|       - python3-django
 | |
|       - python3-django-captcha
 | |
|       - python3-djangorestframework
 | |
|       - python3-django-captcha
 | |
|       - python3-django-reversion
 | |
|       - python3-django-ldapdb
 | |
|       - python3-pip
 | |
|       - python3-pil
 | |
|       - python3-crypto
 | |
|       - python3-git
 | |
|       - python3-netaddr
 | |
|       - python3-psycopg2
 | |
|       - ipython3
 | |
|       - libsasl2-dev
 | |
|       - libldap2-dev
 | |
|       - libssl-dev
 | |
|       - javascript-common
 | |
|   register: apt_result
 | |
|   retries: 3
 | |
|   until: apt_result is succeeded
 | |
| 
 | |
| - name: Install re2o pip3 dependencies
 | |
|   pip:
 | |
|     executable: pip3
 | |
|     name:
 | |
|       - django-bootstrap3==11.1.0
 | |
|       - django-macaddress==1.6.0
 | |
| 
 | |
| - name: Create re2o directory
 | |
|   file:
 | |
|     path: /var/www/re2o
 | |
|     state: directory
 | |
|     mode: '2775'
 | |
|     owner: "{{ re2o.owner }}"
 | |
|     group: "{{ re2o.group }}"
 | |
| 
 | |
| - name: Set ACL for re2o directory
 | |
|   acl:
 | |
|     path: /var/www/re2o
 | |
|     default: true
 | |
|     entity: _nounou
 | |
|     etype: group
 | |
|     permissions: rwx
 | |
|     state: query
 | |
| 
 | |
| - name: Clone re2o repository
 | |
|   git:
 | |
|     repo: 'http://gitlab.adm.crans.org/nounous/re2o.git'
 | |
|     dest: /var/www/re2o
 | |
|     umask: '002'
 | |
|     version: "{{ re2o.version }}"
 | |
| 
 | |
| - name: Set owner of cloned project
 | |
|   file:
 | |
|     path: /var/www/re2o
 | |
|     owner: "{{ re2o.owner }}"
 | |
|     recurse: true
 | |
| 
 | |
| - name: Indicate re2o in motd
 | |
|   template:
 | |
|     src: update-motd.d/05-service.j2
 | |
|     dest: /etc/update-motd.d/05-re2o
 | |
|     mode: 0755
 | |
| 
 | |
| - name: Deploy Re2o settings_local.py
 | |
|   template:
 | |
|     src: re2o/settings_local.py.j2
 | |
|     dest: /var/www/re2o/re2o/settings_local.py
 | |
|     mode: 0660
 | |
|     owner: "{{ re2o.settings_local_owner }}"
 | |
|     group: "{{ re2o.settings_local_group }}"
 |