Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
Size: Mime:
# tasks file for wordpress, themes
---
- name: themes | identify installation
  command: >
    wp-cli --allow-root --no-color --path='{{ item.0.path }}' theme is-installed {{ item.1.name }}
  register: _check_installation_themes
  failed_when: false
  changed_when: false
  with_subelements:
    - "{{ wordpress_installs }}"
    - themes
  when: item.1.name
  tags:
    - wordpress-themes-is-installed-theme

- name: themes | install
  command: >
    wp-cli --allow-root --no-color --path='{{ item.item.0.path }}' theme install {{ item.item.1.name }}
  with_items: "{{ _check_installation_themes.results | default([]) }}"
  when: item.item.1.name and item.rc != 0
  tags:
    - wordpress-themes-install-theme

- name: themes | check install
  command: >
    wp-cli --allow-root --no-color --path='{{ item.0.path }}' theme is-installed {{ item.1.name }}
  changed_when: false
  with_subelements:
    - "{{ wordpress_installs }}"
    - themes
  when: item.1.name
  tags:
    - wordpress-themes-install-theme-check

- name: themes | activate
  command: >
    wp-cli --allow-root --no-color --path='{{ item.0.path }}' theme activate {{ item.1.name }}
  register: _check_activate_theme
  changed_when: "'Success: Switched to' in _check_activate_theme.stdout"
  with_subelements:
    - "{{ wordpress_installs }}"
    - themes
  when: item.1.name and item.1.activate | default(false)
  tags:
    - wordpress-themes-activate-theme