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

Add support for custom hostname and port in JBoss module #37632

Open
wants to merge 6 commits into
base: devel
from

Conversation

Projects
None yet
5 participants
@jurikolo

jurikolo commented Mar 20, 2018

SUMMARY

Fixed #26379. Additionally to original:

Updates JBoss module to support deployment through HTTP management API and JBoss CLI.

As it currently stands, the module only supports filesystem deployments using the deployment scanner, which is not recommended for production in the latest versions of JBoss/Wildfly. These updates provide more flexibility by supporting deployment through the HTTP management API and the JBoss CLI, either of which is preferred over filesystem deployments.

My commit adds support for hostname and port to CLI deployment method. This might be required when Wildfly is running with port offset and is bind to specific IP address.

ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME

JBoss module

ANSIBLE VERSION
ansible 2.4.3.0
  config file = /etc/ansible/ansible.cfg
  configured module search path = [u'/home/jurikolo/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python2.7/site-packages/ansible
  executable location = /usr/bin/ansible
  python version = 2.7.14 (default, Feb 27 2018, 20:43:24) [GCC 7.3.1 20180130 (Red Hat 7.3.1-2)]
@ansibot

This comment has been minimized.

Contributor

ansibot commented Mar 20, 2018

The test ansible-test sanity --test no-assert [explain] failed with 3 errors:

lib/ansible/modules/web_infrastructure/jboss.py:237:13: raise AssertionError instead of: assert info['status'] == 200
lib/ansible/modules/web_infrastructure/jboss.py:276:13: raise AssertionError instead of: assert resp.status_code == 200
lib/ansible/modules/web_infrastructure/jboss.py:299:13: raise AssertionError instead of: assert resp.status_code == 200

The test ansible-test sanity --test validate-modules [explain] failed with 8 errors:

lib/ansible/modules/web_infrastructure/jboss.py:0:0: E309 version_added for new option (cli_path) should be 2.6. Currently 2.4
lib/ansible/modules/web_infrastructure/jboss.py:0:0: E309 version_added for new option (deployment_strategy) should be 2.6. Currently 2.4
lib/ansible/modules/web_infrastructure/jboss.py:0:0: E309 version_added for new option (hostname) should be 2.6. Currently 2.4
lib/ansible/modules/web_infrastructure/jboss.py:0:0: E309 version_added for new option (port) should be 2.6. Currently 2.4
lib/ansible/modules/web_infrastructure/jboss.py:0:0: E309 version_added for new option (url_password) should be 2.6. Currently 2.4
lib/ansible/modules/web_infrastructure/jboss.py:0:0: E309 version_added for new option (url_username) should be 2.6. Currently 2.4
lib/ansible/modules/web_infrastructure/jboss.py:0:0: E324 Value for "default" from the argument_spec ('admin') for "url_password" does not match the documentation (None)
lib/ansible/modules/web_infrastructure/jboss.py:0:0: E324 Value for "default" from the argument_spec ('admin') for "url_username" does not match the documentation (None)

click here for bot help

@ansibot

This comment has been minimized.

Contributor

ansibot commented Mar 20, 2018

Fix CI tests: replace asserts with if statement, update version to 2.…
…6, added defaults for url_password and url_username
@ansibot

This comment has been minimized.

Contributor

ansibot commented Mar 23, 2018

The test ansible-test sanity --test pylint [explain] failed with 2 errors:

lib/ansible/modules/web_infrastructure/jboss.py:201:43: undefined-variable Undefined variable 'state'
lib/ansible/modules/web_infrastructure/jboss.py:212:47: undefined-variable Undefined variable 'state'

The test ansible-test sanity --test pep8 [explain] failed with 1 error:

lib/ansible/modules/web_infrastructure/jboss.py:427:44: E202 whitespace before ')'

click here for bot help

Show resolved Hide resolved lib/ansible/modules/web_infrastructure/jboss.py Outdated
Show resolved Hide resolved lib/ansible/modules/web_infrastructure/jboss.py Outdated
Show resolved Hide resolved lib/ansible/modules/web_infrastructure/jboss.py Outdated
Show resolved Hide resolved lib/ansible/modules/web_infrastructure/jboss.py Outdated
Show resolved Hide resolved lib/ansible/modules/web_infrastructure/jboss.py Outdated
Show resolved Hide resolved lib/ansible/modules/web_infrastructure/jboss.py
@ansibot

This comment has been minimized.

Contributor

ansibot commented Aug 6, 2018

The test ansible-test sanity --test validate-modules [explain] failed with 6 errors:

lib/ansible/modules/web_infrastructure/jboss.py:0:0: E309 version_added for new option (cli_path) should be 2.7. Currently 2.6
lib/ansible/modules/web_infrastructure/jboss.py:0:0: E309 version_added for new option (deployment_strategy) should be 2.7. Currently 2.6
lib/ansible/modules/web_infrastructure/jboss.py:0:0: E309 version_added for new option (hostname) should be 2.7. Currently 2.6
lib/ansible/modules/web_infrastructure/jboss.py:0:0: E309 version_added for new option (port) should be 2.7. Currently 2.6
lib/ansible/modules/web_infrastructure/jboss.py:0:0: E309 version_added for new option (url_password) should be 2.7. Currently 2.6
lib/ansible/modules/web_infrastructure/jboss.py:0:0: E309 version_added for new option (url_username) should be 2.7. Currently 2.6

click here for bot help

@jairojunior

This comment has been minimized.

Member

jairojunior commented Aug 7, 2018

I created a few JBoss modules a while ago to manage it's configuration, command execution and deployment through Management API a while ago

Newest PR's are #40320 and #43682 . It would be nice if you could take a look.

@ansibot ansibot added the stale_ci label Aug 15, 2018

@ansibot

This comment has been minimized.

Contributor

ansibot commented Sep 16, 2018

@ansibot

This comment has been minimized.

Contributor

ansibot commented Dec 4, 2018

The test ansible-test sanity --test pylint [explain] failed with 1 error:

lib/ansible/modules/web_infrastructure/jboss.py:422:8: ansible-deprecated-no-version Display.deprecated call without a version

The test ansible-test sanity --test validate-modules [explain] failed with 6 errors:

lib/ansible/modules/web_infrastructure/jboss.py:0:0: E309 version_added for new option (cli_path) should be 2.8. Currently 2.6
lib/ansible/modules/web_infrastructure/jboss.py:0:0: E309 version_added for new option (deployment_strategy) should be 2.8. Currently 2.6
lib/ansible/modules/web_infrastructure/jboss.py:0:0: E309 version_added for new option (hostname) should be 2.8. Currently 2.6
lib/ansible/modules/web_infrastructure/jboss.py:0:0: E309 version_added for new option (port) should be 2.8. Currently 2.6
lib/ansible/modules/web_infrastructure/jboss.py:0:0: E309 version_added for new option (url_password) should be 2.8. Currently 2.6
lib/ansible/modules/web_infrastructure/jboss.py:0:0: E309 version_added for new option (url_username) should be 2.8. Currently 2.6

click here for bot help

@ansibot ansibot removed the stale_ci label Dec 4, 2018

@ansibot ansibot removed the ci_verified label Dec 12, 2018

@gundalow

This comment has been minimized.

Contributor

gundalow commented Dec 12, 2018

@jhoekx @Wolfant @wbrefvem @jairojunior could you please review this JBoss PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment