Skip to content
Snippets Groups Projects
Commit 5d6586fd authored by jurgenhaas's avatar jurgenhaas
Browse files

ansible-playbooks/general#85 Linting

parent 1595aefe
No related branches found
No related tags found
No related merge requests found
---
# file: roles/openphoto/handlers/main.yml
- name: 'OpenPhoto | Restart Apache'
- name: OpenPhoto | Restart Apache
service: name=apache2 state=restarted
---
# file: roles/openphoto/tasks/main.yml
- name: "OpenPhoto Role"
set_fact: role_openphoto_started=true
tags: 'always'
- name: OpenPhoto Role
set_fact:
role_openphoto_started: yes
tags:
- always
- block:
- name: 'OpenPhoto | Install packages'
- name: OpenPhoto | Install packages
apt: pkg={{ packages }} state=present update_cache=yes
vars:
packages:
......@@ -27,7 +29,7 @@
- php5-imagick
- exiftran
- name: 'OpenPhoto | Enable some required modules'
- name: OpenPhoto | Enable some required modules
apache2_module: "{{ item }}"
with_items:
- rewrite
......@@ -40,23 +42,23 @@
#mkdir -p /etc/php5/apache2/conf.d/
#echo "extension=oauth.so" >> /etc/php5/apache2/conf.d/oauth.ini
- name: 'OpenPhoto | Checkout OpenPhoto from GitHub'
- name: OpenPhoto | Checkout OpenPhoto from GitHub
git: repo=git@github.com:photo/frontend.git
dest=/var/www/openphoto
accept_hostkey=yes
become: false
- name: 'OpenPhoto | Prepare directories'
- name: OpenPhoto | Prepare directories
file:
dest='{{ item }}'
state=directory
mode='775'
with_items:
- '/var/www/openphoto/src/userdata'
- '/var/www/openphoto/src/html/assets/cache'
- '/var/www/openphoto/src/html/photos'
- /var/www/openphoto/src/userdata
- /var/www/openphoto/src/html/assets/cache
- /var/www/openphoto/src/html/photos
- name: 'OpenPhoto | Prepare ownership'
- name: OpenPhoto | Prepare ownership
file:
path="{{ item }}"
owner="www-data"
......@@ -64,17 +66,17 @@
recurse=yes
follow=no
with_items:
- '/var/www/openphoto/src/userdata'
- '/var/www/openphoto/src/html/assets/cache'
- '/var/www/openphoto/src/html/photos'
- /var/www/openphoto/src/userdata
- /var/www/openphoto/src/html/assets/cache
- /var/www/openphoto/src/html/photos
- name: 'OpenPhoto | Configuration file for apache'
- name: OpenPhoto | Configuration file for apache
template: src=openphoto-vhost.conf
dest=/etc/apache2/sites-available/openphoto
- name: 'OpenPhoto | Enable the openphoto site for Apache'
- name: OpenPhoto | Enable the openphoto site for Apache
command: a2ensite openphoto creates=/etc/apache2/sites-enabled/openphoto
notify:
- 'OpenPhoto | Restart Apache'
- OpenPhoto | Restart Apache
when: '"openphoto" not in excluded_roles'
when: not excluded_roles or "openphoto" not in excluded_roles
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment