2023-04-07 16:29:18 +00:00
|
|
|
---
|
2023-04-07 16:31:24 +00:00
|
|
|
- name: Task name
|
|
|
|
stat:
|
|
|
|
path: /var/www/{{ vhost_name }}/wp-config.php
|
|
|
|
register: project_config
|
|
|
|
|
|
|
|
- name: Copy Configuration file
|
|
|
|
template:
|
|
|
|
src: files/wp-config.php.j2
|
|
|
|
dest: /var/www/{{ vhost_name }}/wp-config.php
|
|
|
|
when: not project_config.stat.exists
|
2023-04-07 16:33:50 +00:00
|
|
|
|
|
|
|
- name: Chown
|
|
|
|
become: true
|
|
|
|
shell: chown -R www-data:www-data /var/www/{{ vhost_name }}/wp-config.php
|
|
|
|
when: not project_config.stat.exists
|
|
|
|
|
|
|
|
- name: Chmod
|
|
|
|
become: true
|
|
|
|
shell: chmod -R 755 /var/www/{{ vhost_name }}/wp-config.php
|
|
|
|
when: not project_config.stat.exists
|