ansible-wordpress-host-init/roles/configure-wordpress/tasks/main.yml
2023-04-07 18:33:50 +02:00

21 lines
548 B
YAML

---
- 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
- 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