drupal-vm
drupal-vm copied to clipboard
Add debug mode and hide deprecation warnings by default
Issue #1553. I'm assuming you're not going to bump the version requirements of all your roles to 2.4.0. If you are we could drop the conditional ansible.cfg config.
ansible.cfgwas never loaded with Vagrant. It would need to reside next to theVagrantfileto do so.control_pathno longer needs to be set inansible.cfg(read https://github.com/geerlingguy/drupal-vm/commit/633810ae76f19cedc3e204d56cd8d1c866c13926)- Hide Vagrant 2.0+ messages about ansible auto compatibility mode. @geerlingguy could you test this on vagrant < 2.0 to make sure it works? (read docs)
- Add support for
DRUPALVM_DEBUGenvironment variable to easily debug ansible tasks (see examples in https://github.com/geerlingguy/drupal-vm/commit/93abae9d3f05b1147a9071e256820887e10fe338) - Hide deprecation warnings by default, unless DRUPALVM_DEBUG is truthy. I don't think users need to care about such things. This puts a bit more pressure on developers to stay up-to-date with ansible releases though but that shouldn't be a problem for @geerlingguy :) He has 1 or 2 other roles he maintains and learns about these things from. If you prefer I can drop this commit though.
I especially like the ability to tell users in the issue queue to run DRUPALVM_DEBUG=v vagrant up
My main question is what does the debug .cfg file provide over the normal one? It seems like it would just be the first few messages at the top of the Ansible playbook output—but is there any more? Maybe it's just my late-night read of the code...
I do like the idea of hiding the deprecation warnings. Since 2.2, it seems like Ansible will be popping deprecation warnings for some commonly-used features that don't have a backwards-compatible fix, so either we live with the warnings, I break compatibility with Ansible < latest, or we do this.
Since Drupal VM is an end-user-oriented system, it shouldn't be showing these more playbook-developer-centric messages since the end user can't really do anything about it.
My main question is what does the debug .cfg file provide over the normal one? It seems like it would just be the first few messages at the top of the Ansible playbook output—but is there any more?
No that's it but I wasn't aware of disabling depreciation notices any other way than with a config file. Is it possible somehow?
Also as I'm fixing the bug where the ansible.cfg isn't taken into account at all currently, I thought it was better to introduce a new ansible.debug.cfg vs ansible.cfg setup so it's more clear. Let me know if you come up with something better.
I'll take a second look soon since I finally had some time to finish up the 4.7.0 release.
@oxyc - This looks great! One last suggestion—can we add something in the docs about setting DRUPALVM_DEBUG=v to enable debug mode?
I'm closing PRs which have conflicts or are failing builds and are older than 6 months old, to tidy up the Drupal VM PR queue; please create a new PR against the latest master branch if you feel this is still an important fix or feature for Drupal VM. Thank you!
(Note that I'm still for these changes, with the small addition of something about debugging with DRUPALVM_DEBUG=v.)
I'll reopen this and work on the docs (soon!)