Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
50 lines (37 sloc) 1.42 KB
---
- tags: [ wordpress, wordpress-cli ]
become: yes
block:
# boilerplate
- name: bootstrap enough that ansible can run most ansible modules
include_tasks: "bootstrap/main.yml"
tags: [ bootstrap ]
# boilerplate
- include_tasks: bootstrap/distro-vars-import.yml
tags: always
## START OF MAIN TASKS SECTION ##
# this is a general check that mysql module is working...
- name: run something that tests the mysql resource is working
mysql_variables:
variable: sync_binlog
## __ __ _ ___ _ _
## \ \ / /__ _ _ __| |_ __ _ _ ___ ______ / __(_) |_ ___ ___
## \ \/\/ / _ \ '_/ _` | '_ \ '_/ -_|_-<_-< \__ \ | _/ -_|_-<
## \_/\_/\___/_| \__,_| .__/_| \___/__/__/ |___/_|\__\___/__/
## |_|
# if sites was provided as a list, loop over the instances
- include_tasks: install/wp-install-cli.yml
# if sites was provided as a list, loop over the instances
- include_tasks: install/wp-create-site.yml
loop_control:
loop_var: wp_site_local
with_items: "{{ wp_sites }}"
# if just the wp_site var was defined, use that instead...
- name: if a single wp_site was provided, set the loop var wp_site_local
set_fact:
wp_site_local: "{{ wp_site }}"
when: wp_site is defined
- include_tasks: install/wp-create-site.yml
when: wp_site is defined
tags: always
## END OF MAIN TASKS SECTION ##