forked from WWBN/AVideo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request WWBN#1169 from aermike/patch-1
ansible plybook for youphptube
- Loading branch information
Showing
1 changed file
with
127 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,127 @@ | ||
--- | ||
- hosts: jitsi | ||
become: true | ||
pre_tasks: | ||
- name: Update apt cache | ||
apt: update_cache=yes cache_valid_time=3600 | ||
|
||
handlers: | ||
- name: restart apache | ||
service: name=apache2 state=restarted | ||
|
||
tasks: | ||
|
||
- name: instalez pachete necesare | ||
apt: name={{ item }} state=present | ||
with_items: | ||
- software-properties-common | ||
- dirmngr | ||
- sudo | ||
- python-mysqldb | ||
|
||
- name: adaug cheie | ||
command: | ||
apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 0xF1656F24C74CD1D8 | ||
|
||
- name: adaug repo | ||
apt_repository: | ||
repo: deb [arch=amd64,i386,ppc64el] http://ftp.osuosl.org/pub/mariadb/repo/10.2/debian stretch main | ||
state: present | ||
|
||
- name: instalez mariadb | ||
apt: | ||
name: mariadb-server | ||
state: present | ||
|
||
- name: remove test database | ||
mysql_db: db=test state=absent | ||
|
||
- name: creez baza de date youPHPtube | ||
mysql_db: db=youPHPTube state=present | ||
|
||
- name: creez user youphptube | ||
mysql_user: | ||
name: youphptube | ||
password: passw0rd | ||
priv: 'youPHPTube.*:ALL,GRANT' | ||
host: localhost | ||
state: present | ||
|
||
- name: creez baza de date youPHPTubeEncoder | ||
mysql_db: db=youPHPTubeEncoder state=present | ||
|
||
- name: creez user youPHPTubeEncoder | ||
mysql_user: | ||
name: youphptubeencoder | ||
password: passw0rd | ||
priv: 'youPHPTubeEncoder.*:ALL,GRANT' | ||
host: localhost | ||
state: present | ||
|
||
- name: instalez alte pachete | ||
apt: name={{ item }} state=present | ||
with_items: | ||
- curl | ||
- apache2 | ||
- php7.0 | ||
- libapache2-mod-php7.0 | ||
- php7.0-mysql | ||
- php7.0-curl | ||
- php7.0-gd | ||
- php7.0-intl | ||
- ffmpeg | ||
- git | ||
- libimage-exiftool-perl | ||
- python | ||
|
||
- name: iau youPHPtube | ||
git: | ||
repo: https://github.com/DanielnetoDotCom/YouPHPTube.git | ||
dest: /var/www/html/YouPHPTube | ||
clone: yes | ||
|
||
- name: iau youPHPTubeEncoder | ||
git: | ||
repo: https://github.com/DanielnetoDotCom/YouPHPTube-Encoder.git | ||
dest: /var/www/html/YouPHPTube-Encoder | ||
clone: yes | ||
|
||
- name: iau youtube-dl si setez drepturi | ||
command: "{{ item }}" | ||
warn: False | ||
with_items: | ||
- curl -L https://youtube-dl.org/downloads/latest/youtube-dl -o /usr/local/bin/youtube-dl | ||
- chmod a+rx /usr/local/bin/youtube-dl | ||
- a2enmod rewrite | ||
notify: restart apache | ||
|
||
- name: creez director videos in youPHPtube | ||
file: | ||
path: /var/www/html/YouPHPTube/videos | ||
state: directory | ||
owner: www-data | ||
group: www-data | ||
mode: 0755 | ||
|
||
- name: creez director videos in youPHPTubeEncoder | ||
file: | ||
path: /var/www/html/YouPHPTube-Encoder/videos | ||
state: directory | ||
owner: www-data | ||
group: www-data | ||
mode: 0755 | ||
|
||
- name: modific php.ini | ||
lineinfile: | ||
dest: "{{ item.dest}}" | ||
regexp: "{{ item.regexp }}" | ||
line: "{{ item.line }}" | ||
backrefs: yes | ||
with_items: | ||
- {dest: '/etc/php/7.0/apache2/php.ini', regexp: 'post_max_size = 8M', line: 'post_max_size = 1000M'} | ||
- {dest: '/etc/php/7.0/apache2/php.ini', regexp: 'upload_max_filesize = 2M', line: 'upload_max_filesize = 1000M'} | ||
- {dest: '/etc/php/7.0/apache2/php.ini', regexp: 'max_execution_time = 30', line: 'max_execution_time = 7200'} | ||
- {dest: '/etc/php/7.0/apache2/php.ini', regexp: 'memory_limit = 128M', line: 'memory_limit = 512M'} | ||
- {dest: '/etc/apache2/apache2.conf', regexp: '<Directory /var/www/> AllowOverride None', line: 'AllowOverride All' } | ||
notify: restart apache | ||
|