|
- - hosts: all
- become: true
- tasks:
- - apt_repository:
- repo: 'ppa:ondrej/php'
- - apt:
- update_cache: yes
- - apt: name={{item}} state=present
- with_items:
- - apache2
- - php5.6
- - php5.6-mysql
- - php5.6-cli
- - php5.6-mcrypt
- - php5.6-mbstring
- - php5.6-mysql
- - php5.6-gd
- - php5.6-intl
- - php5.6-curl
- - php5.6-zip
- - mysql-server
- - python-mysqldb
- - lineinfile:
- path: '/etc/apache2/sites-available/000-default.conf'
- regexp: 'DocumentRoot'
- line: ' DocumentRoot /var/www/epesi'
- - service: name=apache2 state=restarted
- - mysql_db: name=epesi state=present
- - mysql_user:
- name: admin
- password: "{{ lookup('password', './mysqlpassword length=8') }}"
- priv: 'epesi.*:ALL,GRANT'
- state: present
|