Quando faço as alterações e tento subir apresenta esse erro :
Your server is running PHP version 5.5.9-1ubuntu4.29 but WordPress 5.4.2 requires at least 5.6.20.
tentei colocar outra versão no php e deu o seguinte erro:
Error establishing a database connection
segue abaixo meu arquivo provisioning:
hosts: all handlers:
- name: restart apache service: name: apache2 state: restarted become: yes
tasks:
name: 'Instala os pacotes do sistema operacional ' apt: name: "{{ item }}" state: latest become: yes with_items:
- php5
- apache2
- libapache2-mod-php5
- php5-gd
- libssh2-php
- php5-mcrypt
- mysql-server-5.6
- python-mysqldb
- php5-mysql
name: 'Criação do banco de dados Mysql' mysql_db: name: wordpress-db login_user: root state: present
name: 'Craiação de user com privilegios ' mysql_user: login_user: root name: wordpress_user password: 12345 priv: '.:ALL,GRANT' state: present
name: 'Download arquivo de instalação wordpress' get_url: url: 'https://wordpress.org/wordpress-5.0.tar.gz' dest: '/tmp/wordpress.tar.gz' become: yes
name: 'Descompacta o wordpress' unarchive: src: '/tmp/wordpress.tar.gz' dest: /var/www/ remote_src: yes become: yes
name: Copy file with owner and permissions copy: src: /var/www/wordpress/wp-config-sample.php dest: /var/www/wordpress/wp-config.php remote_src: yes become: yes
name: 'Configura o wp-config com as entradas do banco de dados' replace: path: /var/www/wordpress/wp-config.php regexp: "{{ item.regex }}" replace: "{{ item.value}}" with_items:
- { regex: 'database_name_here', value: 'wordpress-db'}
- { regex: 'username_here', value: ' wordpress_user'}
- { regex: 'password_here', value: '12345'}become: yes
name: 'Configurando o apache2 no wordpress' copy: src: 'files/000-default.conf' dest: '/etc/apache2/sites-available/000-default.conf' become: yes notify:
- restart apache