You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

71 lines
1.9 KiB

- hosts: all
become: yes
become_method: sudo
- name: Update OS
name: '*'
state: latest
- name: wget percona release installation file
shell: cd /root/ && wget$(lsb_release -sc)_all.deb; dpkg -i /root/percona-release_latest.$(lsb_release -sc)_all.deb
- name: setup percona repositories to percona server 5.7
shell: percona-release setup ps57
- name: Update repositories cache
update_cache: yes
- name: ensure nginx is at the latest version
apt: name=nginx state=latest
- name: start nginx
name: nginx
state: started
- name: Add nginx stable repository from PPA and install its signing key on Ubuntu target
repo: ppa:ondrej/php
- name: ensure php7.4-fpm is at the latest version
apt: name=php7.4-fpm state=latest
- name: install php7.4-curl
apt: name=php7.4-curl state=latest
- name: install php7.4-xml
apt: name=php7.4-xml state=latest
- name: install php7.4-pdo
apt: name=php7.4-pdo state=latest
- name: install php7.4-mysql
apt: name=php7.4-mysql state=latest
- name: ensure gpupg2 is at the latest version
apt: name=gnupg2 state=latest
- name: ensure percona-server-57 is installed
apt: name=percona-server-server-5.7 state=latest
# - name: Create a new database with name 'psm'
# shell: mysql -e "CREATE DATABASE psm;"
- name: setup mysql
shell: /vagrant/
- name: copy psm nginx vhost
shell: /bin/cp -far /vagrant/dev/phpservermon-default /etc/nginx/sites-available/default
- name: setup php dependencies
shell: /vagrant/
- name: copy psm config file
shell: /bin/cp -far /vagrant/dev/vagrant-config.php /vagrant/config.php
- name: apply nginx modifications
name: nginx
state: restarted