Hello, I am trying to deploying wordpress using Ansible for first time. I
installed LAMP on my remote server using Ansible but there was a syntax
error while I was trying to install wordpress. it shows--
The error appears to have been in
'/home/nxadmin/wordpress-ansible/roles/wordpress/tasks/main.yml': line 2,
column 36, but may
be elsewhere in the file depending on the exact syntax problem.
The offending line appears to be:
---
- name: Download WordPress get_url:
^ here
My script for deploying Word Press in roles/wordpress/tasks/main.yml are-
---
- name: Download WordPress get_url:
url=https://wordpress.org/latest.tar.gz
dest=/tmp/wordpress.tar.gz
validate_certs=no
- name: Extract WordPress unarchive= src=/tmp/wordpress.tar.gz
dest=/var/www/ copy=no
sudo: yes
- name: Update default Apache site
sudo: yes
lineinfile:
dest=/etc/apache2/sites-enabled/000-default.conf
regexp="(.)+DocumentRoot /var/www/html"
line="DocumentRoot /var/www/wordpress"
notify:
- restart apache
- name: Copy sample config file
command: mv /var/www/wordpress/wp-config-sample.php
/var/www/wordpress/wp-config.php creates=/var/www/wordpress/wp-config.php
sudo: yes
- name: Update WordPress config file
lineinfile:
dest=/var/www/wordpress/wp-config.php
regexp="{{ item.regexp }}"
line="{{ item.line }}"
with_items:
- {'regexp': "define\\('DB_NAME', '(.)+'\\);", 'line':
"define('DB_NAME', '{{wp_mysql_db}}');"}
- {'regexp': "define\\('DB_USER', '(.)+'\\);", 'line':
"define('DB_USER', '{{wp_mysql_user}}');"}
- {'regexp': "define\\('DB_PASSWORD', '(.)+'\\);", 'line':
"define('DB_PASSWORD', '{{wp_mysql_password}}');"}
sudo: yes
Pleae help, It would be thankful
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/af87c59b-339a-4649-adbb-f0b1e7ad22db%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.