- name: Create wordpress configuration file copy: src: /var/www/html/wordpress/wp-config-sample.php dest: /var/www/html/wordpress/wp-config.php remote_src: yes - name: Wordpress conf, db name replace: dest: /var/www/html/wordpress/wp-config.php regexp: 'database_name_here' replace: '{{ DB_NAME }}' - name: Wordpress conf, db username replace: dest: /var/www/html/wordpress/wp-config.php regexp: 'username_here' replace: '{{ DB_USER_NAME }}' - name: Wordpress conf, db passwd replace: dest: /var/www/html/wordpress/wp-config.php regexp: 'password_here' replace: '{{ DB_USER_PASSWORD }}' - name: Wordpress conf, db host replace: dest: /var/www/html/wordpress/wp-config.php regexp: 'localhost' replace: '192.168.56.54'