You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
Go to file
Adrian Likins 934b645191 Support multiple vault passwords (#22756)
Fixes #13243

** Add --vault-id to name/identify multiple vault passwords

Use --vault-id to indicate id and path/type

 --vault-id=prompt  # prompt for default vault id password
 --vault-id=myorg@prompt  # prompt for a vault_id named 'myorg'
 --vault-id=a_password_file  # load ./a_password_file for default id
 --vault-id=myorg@a_password_file # load file for 'myorg' vault id

vault_id's are created implicitly for existing --vault-password-file
and --ask-vault-pass options.

Vault ids are just for UX purposes and bookkeeping. Only the vault
payload and the password bytestring is needed to decrypt a
vault blob.

Replace passing password around everywhere with
a VaultSecrets object.

If we specify a vault_id, mention that in password prompts

Specifying multiple -vault-password-files will
now try each until one works

** Rev vault format in a backwards compatible way

The 1.2 vault format adds the vault_id to the header line
of the vault text. This is backwards compatible with older
versions of ansible. Old versions will just ignore it and
treat it as the default (and only) vault id.

Note: only 2.4+ supports multiple vault passwords, so while
earlier ansible versions can read the vault-1.2 format, it
does not make them magically support multiple vault passwords.

use 1.1 format for 'default' vault_id

Vaulted items that need to include a vault_id will be
written in 1.2 format.

If we set a new DEFAULT_VAULT_IDENTITY, then the default will
use version 1.2

vault will only use a vault_id if one is specified. So if none
is specified and C.DEFAULT_VAULT_IDENTITY is 'default'
we use the old format.

** Changes/refactors needed to implement multiple vault passwords

raise exceptions on decrypt fail, check vault id early

split out parsing the vault plaintext envelope (with the
sha/original plaintext) to _split_plaintext_envelope()

some cli fixups for specifying multiple paths in
the unfrack_paths optparse callback

fix py3 dict.keys() 'dict_keys object is not indexable' error

pluralize cli.options.vault_password_file -> vault_password_files
pluralize cli.options.new_vault_password_file -> new_vault_password_files
pluralize cli.options.vault_id -> cli.options.vault_ids

** Add a config option (vault_id_match) to force vault id matching.

With 'vault_id_match=True' and an ansible
vault that provides a vault_id, then decryption will require
that a matching vault_id is required. (via
--vault-id=my_vault_id@password_file, for ex).

In other words, if the config option is true, then only
the vault secrets with matching vault ids are candidates for
decrypting a vault. If option is false (the default), then
all of the provided vault secrets will be selected.

If a user doesn't want all vault secrets to be tried to
decrypt any vault content, they can enable this option.

Note: The vault id used for the match is not encrypted or
cryptographically signed. It is just a label/id/nickname used
for referencing a specific vault secret.
7 years ago
.github Remove author from list of iam maintainers 7 years ago
bin ansible-connection Python3 fix (#26441) 7 years ago
contrib Fix undefined variables, basestring usage, and some associated python3 issues 7 years ago
docs Revert "Revert "Allow ini plugin to load file using other encoding than utf8." (#27407)" 7 years ago
examples Fix one name in module error due to rewritten VariableManager 7 years ago
hacking [cloud] Fix setup_iam to use policy_name, not PolicyName (#26880) 7 years ago
lib/ansible Support multiple vault passwords (#22756) 7 years ago
packaging Fix pycrypto backend setting to work when multiple distros are specified in DEB_DIST 7 years ago
test Support multiple vault passwords (#22756) 7 years ago
ticket_stubs Remove obsolete ticket stubs. 8 years ago
.coveragerc Docker image updates for integration tests. (#26054) 7 years ago
.gitattributes avoid exporting files useless to dist 7 years ago
.gitignore Remove old/obsolete directories from .gitignore (#26680) 7 years ago
.gitmodules Code cleanup. 8 years ago
.mailmap add mailmap entries for @resmo 8 years ago
.yamllint Lint YAML files under test/ 8 years ago
CHANGELOG.md Add stderr callback plugin to changelog 7 years ago
CODING_GUIDELINES.md Use pycodestyle instead of pep8 (#25947) 7 years ago
CONTRIBUTING.md Update CONTRIBUTING.md with more recent developments 9 years ago
COPYING license file should be in source tree 13 years ago
MANIFEST.in include .psm1 files in MANIFEST (#27286) 7 years ago
MODULE_GUIDELINES.md Add a direct link to the maintainer's file (#26450) 7 years ago
Makefile Add make target for printing version (#26657) 7 years ago
README.md Fix installation instructions link in the README (#24754) 7 years ago
RELEASES.txt Replace RELEASES.txt with the latest version. 7 years ago
ROADMAP.rst docs: fix community meetings link (#27264) 7 years ago
VERSION Bumping devel version to 2.4.0 8 years ago
ansible-core-sitemap.xml Remove remnants of obsolete fireball mode. 8 years ago
docsite_requirements.txt Fixes the build issue pertaining to sphinx-build which is required to build ansible (#22480) 8 years ago
requirements.txt Cyptography pr 20566 rebase (#25560) 7 years ago
setup.py Maintain symlinks in setup.py sdist, build, and install commands (#27149) 7 years ago
shippable.yml Use subset of Windows tests for "all" tests. (#26830) 7 years ago
tox.ini Update tox.ini to use ansible-test. 7 years ago

README.md

PyPI version Build Status

Ansible

Ansible is a radically simple IT automation system. It handles configuration-management, application deployment, cloud provisioning, ad-hoc task-execution, and multinode orchestration - including trivializing things like zero downtime rolling updates with load balancers.

Read the documentation and more at https://ansible.com/

Many users run straight from the development branch (it's generally fine to do so), but you might also wish to consume a release.

You can find instructions here for a variety of platforms.

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.

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.
  • All code submissions are done through pull requests. Take care to make sure no merge commits are in the submission, and use git rebase vs git merge for this reason. If submitting a large code change (other than modules), it's probably a good idea to join ansible-devel and talk about what you would like to do or add first and to avoid duplicate efforts. This not only helps everyone know what's going on, it also helps save time and effort if we decide some changes are needed.
  • Users list: ansible-project
  • Development list: ansible-devel
  • Announcement list: ansible-announce - read only
  • irc.freenode.net: #ansible

Branch Info

  • Releases are named after Led Zeppelin songs. (Releases prior to 2.0 were named after Van Halen songs.)
  • The devel branch corresponds to the release actively under development.
  • For releases 1.8 - 2.2, modules are kept in different repos, you'll want to follow core and extras
  • Various release-X.Y branches exist for previous releases.
  • We'd love to have your contributions, read Community Information for notes on how to get started.

Authors

Ansible was created by Michael DeHaan (michael.dehaan/gmail/com) and has contributions from over 1000 users (and growing). Thanks everyone!

Ansible is sponsored by Ansible, Inc

Licence

GNU Click on the Link to see the full text.