Skip to content
Snippets Groups Projects
Commit 9c6faf6c authored by jurgenhaas's avatar jurgenhaas
Browse files

ansible-playbooks/general#85 Linting [skip-ci]

parent 5d6586fd
No related branches found
No related tags found
No related merge requests found
......@@ -2,4 +2,6 @@
# file: roles/openphoto/handlers/main.yml
- name: OpenPhoto | Restart Apache
service: name=apache2 state=restarted
service:
name: apache2
state: restarted
......@@ -9,74 +9,81 @@
- block:
- name: OpenPhoto | Install packages
apt: pkg={{ packages }} state=present update_cache=yes
vars:
packages:
- apache2
- build-essential
- curl
- libapache2-mod-php5
- libpcre3-dev
- php-apc
- php-pear
- php5
- php5-curl
- php5-gd
- php5-mcrypt
- php5-mysql
- php5-dev
- php5-imagick
- exiftran
- name: OpenPhoto | Install packages
apt:
pkg: '{{ packages }}'
state: present
update_cache: yes
vars:
packages:
- apache2
- build-essential
- curl
- libapache2-mod-php5
- libpcre3-dev
- php-apc
- php-pear
- php5
- php5-curl
- php5-gd
- php5-mcrypt
- php5-mysql
- php5-dev
- php5-imagick
- exiftran
- name: OpenPhoto | Enable some required modules
apache2_module: "{{ item }}"
with_items:
- rewrite
- deflate
- expires
- headers
- name: OpenPhoto | Enable some required modules
apache2_module: "{{ item }}"
with_items:
- rewrite
- deflate
- expires
- headers
#OAuth !?
#pecl install --soft oauth
#mkdir -p /etc/php5/apache2/conf.d/
#echo "extension=oauth.so" >> /etc/php5/apache2/conf.d/oauth.ini
#OAuth !?
#pecl install --soft oauth
#mkdir -p /etc/php5/apache2/conf.d/
#echo "extension=oauth.so" >> /etc/php5/apache2/conf.d/oauth.ini
- 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 | 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
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
- name: OpenPhoto | Prepare directories
file:
dest: '{{ item }}'
state: directory
mode: 0775
with_items:
- /var/www/openphoto/src/userdata
- /var/www/openphoto/src/html/assets/cache
- /var/www/openphoto/src/html/photos
- name: OpenPhoto | Prepare ownership
file:
path="{{ item }}"
owner="www-data"
group="www-data"
recurse=yes
follow=no
with_items:
- /var/www/openphoto/src/userdata
- /var/www/openphoto/src/html/assets/cache
- /var/www/openphoto/src/html/photos
- name: OpenPhoto | Prepare ownership
file:
path: '{{ item }}'
owner: www-data
group: www-data
recurse: yes
follow: no
with_items:
- /var/www/openphoto/src/userdata
- /var/www/openphoto/src/html/assets/cache
- /var/www/openphoto/src/html/photos
- name: OpenPhoto | Configuration file for apache
template: src=openphoto-vhost.conf
dest=/etc/apache2/sites-available/openphoto
- 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
command: a2ensite openphoto creates=/etc/apache2/sites-enabled/openphoto
notify:
- OpenPhoto | Restart Apache
- name: OpenPhoto | Enable the openphoto site for Apache
command: a2ensite openphoto
args:
creates: /etc/apache2/sites-enabled/openphoto
notify:
- OpenPhoto | Restart Apache
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.
Finish editing this message first!
Please register or to comment