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 conditional logic for permalink setup task #467

Merged
merged 1 commit into from
Jan 15, 2016

Conversation

fullyint
Copy link
Contributor

The "Setup Permalink Structure" task currently runs when: "wp_permalink_check_results.changed. However, wp_permalink_check_results will never be changed because of the changed_when rule:

# Check Existing Permalink Structure
register: wp_permalink_check_results
changed_when: False

This PR updates the conditional logic.

Same as original: Sets permalink structure only if site_install: true and non-multisite.

Different from original: Runs only in conjunction with new install. Will never run when WP is already installed (even if permalink structure is not set). The rationale is that if WP is already installed, we don't want to potentially override configs users may have set via other means (WP GUI, via wp-cli). As an example, if a user has flushed their rewrite rules, we don't want to reset the rules.

@retlehs
Copy link
Member

retlehs commented Jan 14, 2016

👍 should also add to https://roots.io/trellis/docs/local-development-setup/

edit: roots/docs#14

@fullyint
Copy link
Contributor Author

Good idea! Docs in roots/docs#14

swalkinshaw added a commit that referenced this pull request Jan 15, 2016
Fix conditional logic for permalink setup task
@swalkinshaw swalkinshaw merged commit 59408b4 into roots:master Jan 15, 2016
@fullyint fullyint deleted the permalinks branch January 15, 2016 06:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants