No description
Find a file
Sam Doran e8d4b62b41
Fix YAML error message when error is at the end of the file ()
* Fix YAML error message when error is at the end of the file

If a YAML file fails to load due to a syntax error in a file, or there is an error in the last line of a
file, PyYAML reports the last line number of the file as the index where the error occurred.

When reading the file lines, we use that index to the get the relevant line.  If the index value is out
of range, the relevant line is lost for error reporting.

Subtract one from the index value to avoid the IndexError in this specific scenario. It is possible
to still get an IndexError, which will be handled as it is currently.

* Update existing tests and add new tests
2021-01-19 10:07:36 -05:00
.azure-pipelines Add macOS 11 to CI () 2021-01-11 12:20:47 -05:00
.github Remove shippable.yml 2020-12-07 10:13:09 -08:00
bin Move ansible-test entry point. () 2019-08-08 09:18:31 -07:00
changelogs Fix YAML error message when error is at the end of the file () 2021-01-19 10:07:36 -05:00
docs doc: fix ansible_play_hosts description about failure () 2021-01-18 15:24:29 -05:00
examples rethink wording () 2020-10-30 17:13:12 -04:00
hacking Allow restricting config values to enumerated list () 2021-01-14 15:11:30 -05:00
lib/ansible Fix YAML error message when error is at the end of the file () 2021-01-19 10:07:36 -05:00
licenses Bundle a copy of github.com/nir0s/distro/distro.py 2018-12-17 11:01:01 -08:00
packaging Rename to ansible-core () 2020-11-13 15:42:10 -06:00
test Fix YAML error message when error is at the end of the file () 2021-01-19 10:07:36 -05:00
.cherry_picker.toml 🚸 🐍 🍒 ⛏ Integrate cherry picker () 2018-07-12 19:34:02 +03:00
.gitattributes 2.6 changelog gen/version/root dir cleanup () 2018-05-21 16:14:53 -07:00
.gitignore Add link to all module and plugin indexes () 2020-12-18 11:55:31 -05:00
.mailmap Fix syntax typo 2017-12-24 12:16:17 +01:00
COPYING
Makefile Rename to ansible-core () 2020-11-13 15:42:10 -06:00
MANIFEST.in Add link to all module and plugin indexes () 2020-12-18 11:55:31 -05:00
README.rst update PyPI badge to ansible-core () 2020-12-02 18:26:54 -08:00
requirements.txt collection routing () 2020-05-26 09:42:06 -07:00
setup.py Declare support for Python 3.9 in the metadata 2021-01-05 20:48:08 -08:00

PyPI version Docs badge Chat badge Build Status Ansible Code of Conduct Ansible mailing lists Repository License Ansible CII Best Practices certification

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 with 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 with pip or a package manager. 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

Coding Guidelines

We document our Coding Guidelines in the Developer Guide. We particularly suggest you review:

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 5000 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.