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

VMware: Improve module vmware_host_config_manager #46264

Merged
merged 2 commits into from
Oct 12, 2018

Conversation

ckotte
Copy link
Contributor

@ckotte ckotte commented Sep 28, 2018

SUMMARY

The module doesn't execute in check mode and you cannot see if the settings need to be changed. You also cannot see which settings were changed or need to be changed if you run the play in verbose mode.

ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME

vmware_host_config_manager

ANSIBLE VERSION
# ansible --version
ansible 2.6.3
  config file = /root/ansible-vmware/ansible.cfg
  configured module search path = [u'/root/ansible-vmware/library']
  ansible python module location = /usr/lib/python2.7/site-packages/ansible
  executable location = /usr/bin/ansible
  python version = 2.7.5 (default, Jul 13 2018, 13:06:57) [GCC 4.8.5 20150623 (Red Hat 4.8.5-28)]
ADDITIONAL INFORMATION

before (check mode):
TASK [esxi : Configure persistent logs (Syslog)] *********************************************************************************************************************************************************************************************
before:

TASK [esxi : Configure persistent logs (Syslog)] *********************************************************************************************************************************************************************************************
changed: [esxi_host -> jump_server] => {"changed"}

after (check mode):

TASK [esxi : Configure persistent logs (Syslog)] *********************************************************************************************************************************************************************************************
changed: [esxi_host -> jump_server] => {"changed": true, "msg": "Syslog.global.logDirUnique, Syslog.global.defaultRotate, and Syslog.global.defaultSize would be changed."}

after:

TASK [esxi : Configure persistent logs (Syslog)] *********************************************************************************************************************************************************************************************
changed: [esxi_host -> jump_server] => {"changed": true, "msg": "Syslog.global.logDirUnique, Syslog.global.defaultRotate, and Syslog.global.defaultSize changed."}

@ansibot
Copy link
Contributor

ansibot commented Sep 28, 2018

@ansibot
Copy link
Contributor

ansibot commented Sep 28, 2018

Hi @ckotte,

Thank you for the pullrequest, just so you are aware we have a dedicated Working Group for vmware.
You can find other people interested in this in #ansible-vmware on Freenode IRC
For more information about communities, meetings and agendas see https://github.com/ansible/community

click here for bot help

@ansibot ansibot added affects_2.8 This issue/PR affects Ansible v2.8 cloud core_review In order to be merged, this PR must follow the core review workflow. feature This issue/PR relates to a feature request. module This issue/PR relates to a module. needs_triage Needs a first human triage before being processed. support:core This issue/PR relates to code supported by the Ansible Engineering Team. vmware VMware community labels Sep 28, 2018
@Akasurde Akasurde self-requested a review September 28, 2018 16:26
@Akasurde Akasurde removed the needs_triage Needs a first human triage before being processed. label Sep 28, 2018
Copy link
Member

@Akasurde Akasurde left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code LGTM. Could you please add test case for this change ?

@ansibot ansibot added needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. and removed core_review In order to be merged, this PR must follow the core review workflow. labels Sep 28, 2018
@ckotte
Copy link
Contributor Author

ckotte commented Sep 29, 2018

@Akasurde Could you please explain to me what test case I need to add? I only added "supports_check_mode=True", changed the code to not do any changes in check mode, and improved the change message.

@ckotte ckotte force-pushed the vmware_host_config_manager branch 2 times, most recently from fa00bd7 to 6adff61 Compare October 3, 2018 11:23
@ansibot ansibot added support:community This issue/PR relates to code supported by the Ansible community. and removed support:core This issue/PR relates to code supported by the Ansible Engineering Team. labels Oct 3, 2018
@ansibot ansibot added stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. stale_review Updates were made after the last review and the last review is more than 7 days old. labels Oct 11, 2018
@ckotte ckotte changed the title VMware: Add check mode support to module vmware_host_config_manager VMware: Improve module vmware_host_config_manager Oct 11, 2018
@ansibot ansibot removed stale_ci This PR has been tested by CI more than one week ago. Close and re-open this PR to get it retested. stale_review Updates were made after the last review and the last review is more than 7 days old. labels Oct 11, 2018
@Akasurde Akasurde merged commit ade5d93 into ansible:devel Oct 12, 2018
@Akasurde
Copy link
Member

@ckotte Thanks for the contribution.

Tomorrow9 pushed a commit to Tomorrow9/ansible that referenced this pull request Dec 4, 2018
* Improve module description
* Add check mode support and change message
@ansible ansible locked and limited conversation to collaborators Jul 22, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.8 This issue/PR affects Ansible v2.8 cloud feature This issue/PR relates to a feature request. module This issue/PR relates to a module. needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. support:community This issue/PR relates to code supported by the Ansible community. vmware VMware community
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants