No description
Find a file
Adrián López dac3bf5b71 zabbix_host: interface.port parameter is a string (#64986)
interface.port should be a string to be able to use macros in that
value.
This fixes the case when interface.port is a macro (eg.: "{$MACRO}" and
force=false.

Because, until now, setting the interface.port to an integer was the correct way to work with force=false, a type validation has been added
to that parameter.
Previously, if a string was used for interface.port, it was converted
to an integer, the comparison didn't work (if interface not in interfaces)
and the module tried to register the same interface twice, returning an
error.

Zabbix API manual specifies that only 'main, 'type', 'useip' and 'bulk'
are integers.
https://www.zabbix.com/documentation/current/manual/api/reference/hostinterface/object

Tests are changed to use always str in the interface.port.

Two new tests are added.
The first one is to show that now registering a host with force=false and
a macro in interface.port works.
The other one tests that interfaces defined using string for port are
compared correctly when force=false is used. Previously it was
a comparison between int and str, interfaces were seen as different
and an error was thrown because we were trying to create twice a main
interface.

* Try to kindly convert interface port to the string

As suggested, the previous behaviour could break current configurations. This solution accepts integers and strings.

Co-Authored-By: Dusan Matejka <D3DeFi@users.noreply.github.com>
2019-12-16 10:55:05 +05:30
.github unsubscribe cove from docker modules (#65714) 2019-12-14 13:39:12 +05:30
bin Move ansible-test entry point. (#60281) 2019-08-08 09:18:31 -07:00
changelogs Fix nxos_file_copy option value path validation (#65423) 2019-12-15 10:41:33 +05:30
contrib Update foreman inventory to use foreman's inventory report (#62438) 2019-12-03 15:11:40 -07:00
docs clarify returned value of RETURN nlock (#65724) 2019-12-12 17:12:38 -06:00
examples Fix typos in ansible.cfg comments 2019-11-23 22:15:25 +01:00
hacking add module aws_step_functions_state_machine_execution (#64431) 2019-12-10 14:08:49 -05:00
lib/ansible zabbix_host: interface.port parameter is a string (#64986) 2019-12-16 10:55:05 +05:30
licenses Bundle a copy of github.com/nir0s/distro/distro.py 2018-12-17 11:01:01 -08:00
packaging debian: install lib in dist-packages (#64412) 2019-11-05 10:45:05 -05:00
test zabbix_host: interface.port parameter is a string (#64986) 2019-12-16 10:55:05 +05:30
.cherry_picker.toml
.gitattributes
.gitignore Overhaul ansible-test test path handling. (#61416) 2019-08-27 23:40:06 -07:00
.mailmap
CODING_GUIDELINES.md Tidy up Contributors Docs (#47619) 2018-10-28 17:11:40 -05:00
COPYING
Makefile rpmfilename must be constructed using rpmmacros 2019-10-01 10:29:40 -07:00
MANIFEST.in Remove obsolete MANIFEST.in entries. 2019-09-17 21:49:05 -07:00
MODULE_GUIDELINES.md Tidy up Contributors Docs (#47619) 2018-10-28 17:11:40 -05:00
README.rst Add or later to the license expressed in the README 2019-11-26 08:33:41 -08:00
requirements.txt Change default smart connection to ssh on macOS and remove paramiko from requirements.txt (#54738) 2019-04-03 22:35:59 -04:00
setup.py Declare support for Python 3.8 @ Trove classifiers 2019-10-28 10:06:03 -07:00
shippable.yml Add CentOS 8 to the test matrix (#63649) 2019-12-04 13:39:00 -05:00

PyPI version Docs badge Chat badge Build Status Ansible Code of Conduct Ansible mailing lists Repository License

Ansible

Ansible is a radically simple IT automation system. It handles configuration management, application deployment, cloud provisioning, ad-hoc task execution, network automation, and multi-node orchestration. Ansible makes complex changes like zero-downtime rolling updates with load balancers easy. More information on the Ansible website.

Design Principles

  • Have a dead simple setup process and a minimal learning curve.
  • Manage machines very quickly and in parallel.
  • Avoid custom-agents and additional open ports, be agentless by leveraging the existing SSH daemon.
  • Describe infrastructure in a language that is both machine and human friendly.
  • Focus on security and easy auditability/review/rewriting of content.
  • Manage new remote machines instantly, without bootstrapping any software.
  • Allow module development in any dynamic language, not just Python.
  • Be usable as non-root.
  • Be the easiest IT automation system to use, ever.

Use Ansible

You can install a released version of Ansible via pip, a package manager, or our release repository. See our installation guide for details on installing Ansible on a variety of platforms.

Red Hat offers supported builds of Ansible Engine.

Power users and developers can run the devel branch, which has the latest features and fixes, directly. Although it is reasonably stable, you are more likely to encounter breaking changes when running the devel branch. We recommend getting involved in the Ansible community if you want to run the devel branch.

Get Involved

  • Read Community Information for all kinds of ways to contribute to and interact with the project, including mailing list information and how to submit bug reports and code to Ansible.
  • Join a Working Group, an organized community devoted to a specific technology domain or platform.
  • Submit a proposed code update through a pull request to the devel branch.
  • Talk to us before making larger changes to avoid duplicate efforts. This not only helps everyone know what is going on, it also helps save time and effort if we decide some changes are needed.
  • For a list of email lists, IRC channels and Working Groups, see the Communication page

Branch Info

  • The devel branch corresponds to the release actively under development.
  • The stable-2.X branches correspond to stable releases.
  • Create a branch based on devel and set up a dev environment if you want to open a PR.
  • See the Ansible release and maintenance page for information about active branches.

Roadmap

Based on team and community feedback, an initial roadmap will be published for a major or minor version (ex: 2.7, 2.8). The Ansible Roadmap page details what is planned and how to influence the roadmap.

Authors

Ansible was created by Michael DeHaan and has contributions from over 4700 users (and growing). Thanks everyone!

Ansible is sponsored by Red Hat, Inc.

License

GNU General Public License v3.0 or later

See COPYING to see the full text.