Boa Noite, após realizar a configuração do " Configura o wp-config com as entradas do banco de dados", recebo a mensagem de erro abaixo, alguém consegue me dar uma ajuda ?
ERROR! Syntax Error while loading YAML. did not find expected key
The error appears to be in '/home/teste/wordpress_com_ansible/provisioning2.yml': line 63, column 6, but may be elsewhere in the file depending on the exact syntax problem.
The offending line appears to be:
- { regex: 'password_here', value: '12345'}
became: yes
^ here
ansible-playbook -i hosts provisioning2.yml
password: 12345
priv: 'wordpress_db.*:ALL'
state: present
name: "Baixa o arquivo de instalação do Wordpress" get_url:
url: 'http://wordpress.org/latest.tar.gz' dest: '/tmp/wordpress.tar.gz'
name: 'Descompacta o wordpress' unarchive:
src: '/tmp/wordpress.tar.gz' dest: /var/www/ remote_src: yes
become: yes
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 BD' ansible.builtin.replace: path: '/var/www/wordpress/wp-config.php' regexp: "{{ item.regex }}" replace: "{{ item.value }}" backup: yes with_items:
- { regex: 'database_name_here', value: 'wordpress_db'} - { regex: 'username_here', value: 'wordpress_use'} - { regex: 'password_here', value: '12345'}
became: yes