Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix condition for permalink structure task #643

Merged
merged 1 commit into from
Aug 31, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions roles/wordpress-install/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,17 +51,17 @@
--admin_email="{{ item.value.admin_email }}"
args:
chdir: "{{ www_root }}/{{ item.key }}/{{ item.value.current_path | default('current') }}/"
register: wp_install_results
register: wp_multisite_install_results
with_dict: "{{ wordpress_sites }}"
when: item.value.site_install | default(true) and item.value.multisite.enabled | default(false)
changed_when: "'The network already exists.' not in wp_install_results.stdout"
changed_when: "'The network already exists.' not in wp_multisite_install_results.stdout"

- name: Setup Permalink Structure
command: wp rewrite structure {{ item.value.initial_permalink_structure | default("/%postname%/") }} --allow-root
args:
chdir: "{{ www_root }}/{{ item.key }}/{{ item.value.current_path | default('current') }}/"
with_dict: "{{ wordpress_sites }}"
when: wp_install_results | changed
when: wp_install_results | changed or wp_multisite_install_results | changed

- name: Update WP Multisite Home URL
command: wp option update home {{ site_env.wp_home }} --allow-root
Expand Down