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

ansible-playbooks/general#19 Set role header

parent 82ce6f07
No related branches found
No related tags found
No related merge requests found
---
# file: roles/owncloud/tasks/main.yml
- name: 'ownCloud | Install Public Repo Key'
apt_key:
url='http://download.opensuse.org/repositories/isv:ownCloud:community/xUbuntu_12.04/Release.key'
state=present
- name: 'ownCloud | Add ownCloud Repository To Apt'
copy:
content='deb http://download.opensuse.org/repositories/isv:/ownCloud:/community/xUbuntu_12.04/ /'
dest='/etc/apt/sources.list.d/owncloud.list'
mode=644
- name: 'ownCloud | Install the package'
apt:
pkg=owncloud
state=installed
update_cache=yes
- name: 'ownCloud | Configuration file for apache'
template: src=etc-apache2-sites-available-owncloud
dest=/etc/apache2/sites-available/owncloud
- name: 'ownCloud | Enable the ownCloud site for Apache'
command: a2ensite owncloud creates=/etc/apache2/sites-enabled/owncloud
notify:
- 'ownCloud | Restart Apache'
- name: 'ownCloud | Install cron job'
cron:
name='ownCloud cron'
month='{{ owncloud_cron_core.month|default(omit) }}'
day='{{ owncloud_cron_core.day|default(omit) }}'
weekday='{{ owncloud_cron_core.weekday|default(omit) }}'
hour='{{ owncloud_cron_core.hour|default(omit) }}'
minute='{{ owncloud_cron_core.minute|default(omit) }}'
job='php /var/www/owncloud/cron.php >/dev/null 2>&1'
user='www-data'
when: owncloud_cron_core.active
tags: 'cron'
- name: "ownCloud Role"
set_fact: role_owncloud_started=true
tags: always
- block:
- name: 'ownCloud | Install Public Repo Key'
apt_key:
url='http://download.opensuse.org/repositories/isv:ownCloud:community/xUbuntu_12.04/Release.key'
state=present
- name: 'ownCloud | Add ownCloud Repository To Apt'
copy:
content='deb http://download.opensuse.org/repositories/isv:/ownCloud:/community/xUbuntu_12.04/ /'
dest='/etc/apt/sources.list.d/owncloud.list'
mode=644
- name: 'ownCloud | Install the package'
apt:
pkg=owncloud
state=installed
update_cache=yes
- name: 'ownCloud | Configuration file for apache'
template: src=etc-apache2-sites-available-owncloud
dest=/etc/apache2/sites-available/owncloud
- name: 'ownCloud | Enable the ownCloud site for Apache'
command: a2ensite owncloud creates=/etc/apache2/sites-enabled/owncloud
notify:
- 'ownCloud | Restart Apache'
- name: 'ownCloud | Install cron job'
cron:
name='ownCloud cron'
month='{{ owncloud_cron_core.month|default(omit) }}'
day='{{ owncloud_cron_core.day|default(omit) }}'
weekday='{{ owncloud_cron_core.weekday|default(omit) }}'
hour='{{ owncloud_cron_core.hour|default(omit) }}'
minute='{{ owncloud_cron_core.minute|default(omit) }}'
job='php /var/www/owncloud/cron.php >/dev/null 2>&1'
user='www-data'
when: owncloud_cron_core.active
tags: 'cron'
when: '"owncloud" 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