2017-10-29 16:37:19 +01:00
|
|
|
---
|
2017-12-25 22:31:47 +01:00
|
|
|
- import_tasks: tasks/apt_install.yml
|
|
|
|
- import_tasks: tasks/ufw_tcp.yml
|
2017-10-29 16:37:19 +01:00
|
|
|
|
2017-12-25 22:31:47 +01:00
|
|
|
- import_tasks: mariadb.yml
|
2017-10-29 18:49:04 +01:00
|
|
|
|
2017-11-03 17:40:10 +01:00
|
|
|
- name: Copy apache config
|
|
|
|
copy: src=000-default.conf
|
2017-12-25 22:32:37 +01:00
|
|
|
dest=/etc/apache2/sites-available/
|
2017-11-03 17:40:10 +01:00
|
|
|
owner=root
|
|
|
|
group=root
|
|
|
|
mode=655
|
|
|
|
|
2017-12-25 22:33:01 +01:00
|
|
|
- name: Clone repository
|
|
|
|
git: repo=https://git.2li.ch/ibz/web_AI-5.git
|
|
|
|
dest="/vagrant"
|
|
|
|
force=yes
|
2017-12-29 16:52:19 +01:00
|
|
|
version=production
|
2017-12-25 22:33:01 +01:00
|
|
|
|
|
|
|
- name: Set Permissions on the repository
|
|
|
|
file:
|
|
|
|
dest=/vagrant
|
|
|
|
owner=ansible group=ansible
|
|
|
|
recurse=yes
|
|
|
|
|
2017-12-25 22:33:17 +01:00
|
|
|
- name: Install pip packages
|
|
|
|
pip:
|
|
|
|
name:
|
|
|
|
- django-extensions
|
|
|
|
- Pillow
|
2017-12-27 19:35:36 +01:00
|
|
|
- pyaml
|
2017-12-25 22:33:17 +01:00
|
|
|
executable: pip3
|
|
|
|
|
2017-12-25 22:34:38 +01:00
|
|
|
- name: Run the setup script to add some final touches
|
2017-12-25 22:39:26 +01:00
|
|
|
shell: "/vagrant/ansible/roles/web_AI-5/tasks/setup_script.sh"
|
2017-12-25 22:34:38 +01:00
|
|
|
|
2017-12-31 15:18:16 +01:00
|
|
|
- name: Creates directory
|
|
|
|
file:
|
|
|
|
path: /srv/media
|
|
|
|
state: directory
|
|
|
|
owner: www-data
|
|
|
|
group: www-data
|
|
|
|
mode: 0755
|
|
|
|
|
2017-10-29 16:37:19 +01:00
|
|
|
- name: Restart apache service
|
|
|
|
service: name=apache2 state=restarted
|