Mercurial > hg > Members > anatofuz > wordpress_ansible
diff tasks/setting-wordpress.yml @ 0:10185cc821e4
add
author | k178572 |
---|---|
date | Wed, 20 Sep 2017 18:12:15 +0900 |
parents | |
children | 774156afc195 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tasks/setting-wordpress.yml Wed Sep 20 18:12:15 2017 +0900 @@ -0,0 +1,38 @@ + - name: WordPress Download + get_url: url="https://ja.wordpress.org/wordpress-4.3.1-ja.tar.gz" dest=/tmp + + - name: unarchive source + become: yes + command: tar zxvf /tmp/wordpress-4.3.1-ja.tar.gz chdir=/var/www/html + + - name: change dir / files permission + become: yes + file: path=/var/www/html/wordpress owner=apache group=apache mode=0755 recurse=yes state=directory + + - name: replace /etc/httpd/conf/httpd.conf + become: yes + replace: dest=/etc/httpd/conf/httpd.conf regexp='^DocumentRoot "/var/www/html"$' replace='DocumentRoot "/var/www/html/wordpress"' backup=yes + + - name: replace /etc/httpd/conf/httpd.conf + become: yes + replace: dest=/etc/httpd/conf/httpd.conf regexp='^<Directory "/var/www">$' replace='<Directory "/var/www/wordpress">' backup=yes + + - name: replace /etc/httpd/conf/httpd.conf + become: yes + replace: dest=/etc/httpd/conf/httpd.conf regexp='^AllowOverride None$' replace='AllowOverride All' backup=yes + + - name: cp wp-config.php + become: yes + command: cp '/var/www/html/wordpress/wp-config-sample.php' '/var/www/html/wordpress/wp-config.php' creates=/var/www/html/wordpress/wp-config.php + + - name: replace /var/www/html/wordpress/wp-config.php + become: yes + replace: dest=/var/www/html/wordpress/wp-config.php regexp='database_name_here' replace='wordpress' + + - name: replace /var/www/html/wordpress/wp-config.php + become: yes + replace: dest=/var/www/html/wordpress/wp-config.php regexp='username_here' replace='wordpress' + + - name: replace /var/www/html/wordpress/wp-config.php + become: yes + replace: dest=/var/www/html/wordpress/wp-config.php regexp='password_here' replace='hZzTwWuTeN'