Repository URL to install this package:
|
Version:
1.0.0b1 ▾
|
# tasks file for wordpress, options
---
- name: add options
command: >
wp-cli option
--allow-root --no-color --path='{{ item.0.path }}'
{{ item.1.command }} '{{ item.1.name }}' '{{ item.1.value }}' --autoload={{ 'yes' if item.1.autoload | default(true) else 'no' }}
register: _check_installation_options
failed_when: false
changed_when: "'Added' in _check_installation_options.stdout"
with_subelements:
- "{{ wordpress_installs }}"
- options
when: item.1.command == 'add'
tags:
- wordpress-options-add
- name: update options
command: >
wp-cli option
--allow-root --no-color --path='{{ item.0.path }}'
{{ item.1.command }} '{{ item.1.name }}' '{{ item.1.value }}'
register: _check_installation_options
changed_when: "'unchanged' not in _check_installation_options.stdout"
with_subelements:
- "{{ wordpress_installs }}"
- options
when: item.1.command == 'update'
tags:
- wordpress-options-update
- name: delete options
command: >
wp-cli option
--allow-root --no-color --path='{{ item.0.path }}'
{{ item.1.command }} '{{ item.1.name }}'
register: _check_installation_options
failed_when: false
changed_when: "'Could not delete' not in _check_installation_options.stderr"
with_subelements:
- "{{ wordpress_installs }}"
- options
when: item.1.command == 'delete'
tags:
- wordpress-options-delete