[optimize] Lazy-loaded WordPress inventory #491
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a “same player shoots again” reincarnation of #434.
Loading the inventory from
wordpress-instances.py
takes some time (or even a long time) because it needs tofind(1)
all the sites over NFS. There is already support in the Ansible code base to skiproles/wordpress-instance
when it can be worked out from the tags that we don't need it; this PR likewise makes sure to skip the useless inventory step.lazy_inventory
inventory plugin, which discriminates between “lazy” and “diligent” modes according to the number of times it runs (i.e. one must runmeta: refresh_inventory
to get the full inventory).interactive-playbooks/main.yml
before we runroles/wordpress-instance
. If we don't, then theall_wordpresses
group stays empty (from the “fake” inventory) and therefore the role gets skipped, as it did before