ansible-tools


Nameansible-tools JSON
Version 0.5.0 PyPI version JSON
download
home_pageNone
SummaryKeyring integration and local execution wrappers for Ansible
upload_time2025-02-26 13:53:51
maintainerNone
docs_urlNone
authorNone
requires_python>=3.8
licenseNone
keywords ansible keyring local tools wrapper
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # ansible-tools

[![PyPI Version](https://img.shields.io/pypi/v/ansible-tools.svg)](https://pypi.python.org/pypi/ansible-tools)
[![PyPI Downloads](https://img.shields.io/pypi/dm/ansible-tools.svg)](https://pypi.python.org/pypi/ansible-tools)
[![MIT License](https://img.shields.io/badge/license-mit-blue.svg)](https://choosealicense.com/licenses/mit/)

This is a set of wrappers around the `ansible`, `ansible-playbook` and `ansible-vault` commands
which integrate with the system keyring to retrieve the vault password.

It should work on both Linux and macOS.

# Installation

* On macOS, with Homebrew: `brew install lvillani/tap/ansible-tools`;
* With Pip: `pip install --user ansible-tools`;

It is best, however, to install `ansible-tools` in a Virtualenv, along with the version of Ansible
you are using.

# Overview

- `ansible-vault-helper`: Used by users to setup keyring integration, called by Ansible to obtain a
  Vault unlock password.
- `vaultify`: Wraps Ansible commands such as `ansible`, `ansible-playbook` and `ansible-playbook` so
  that the Vault is automatically unlocked with the password stored in the system's keyring.
- `ansible-local`: Wrapper to run Ansible locally.
- `ansible-mkpasswd`: Generates an encrypted password that can be used with the user module (see also
  [here](https://docs.ansible.com/ansible/latest/reference_appendices/faq.html#how-do-i-generate-encrypted-passwords-for-the-user-module))

# Usage

Go to the same directory that contains your playbooks and then run:

    ansible-vault-helper --update

You will be prompted for a vault name (which can be anything) and the unlock password. The former is
stored in `ansible.cfg` alongside your playbooks, the latter is securely stored in your keyring.

At this point you can run Ansible as usual but precede the command with `vaultify`. That is, to
start a playbook run:

    vaultify ansible-playbook site.yml

We also ship a tool to easily apply a playbook on the current system called `ansible-local` which is
composable with `vaultify`.

# Aliases

Here's a list of handy shell aliases to make your life easier. They were tested on fish but should
work also on Bash and Zsh:

    alias v="vaultify"
    alias ansible="vaultify ansible"
    alias ansible-playbook="vaultify ansible-playbook"

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "ansible-tools",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "ansible, keyring, local, tools, wrapper",
    "author": null,
    "author_email": "Lorenzo Villani <lorenzo@villani.me>",
    "download_url": "https://files.pythonhosted.org/packages/06/f9/b9a1bf674aa155207c9ac76c7ea9f3caee377e764291a1981f333ffdc03b/ansible_tools-0.5.0.tar.gz",
    "platform": null,
    "description": "# ansible-tools\n\n[![PyPI Version](https://img.shields.io/pypi/v/ansible-tools.svg)](https://pypi.python.org/pypi/ansible-tools)\n[![PyPI Downloads](https://img.shields.io/pypi/dm/ansible-tools.svg)](https://pypi.python.org/pypi/ansible-tools)\n[![MIT License](https://img.shields.io/badge/license-mit-blue.svg)](https://choosealicense.com/licenses/mit/)\n\nThis is a set of wrappers around the `ansible`, `ansible-playbook` and `ansible-vault` commands\nwhich integrate with the system keyring to retrieve the vault password.\n\nIt should work on both Linux and macOS.\n\n# Installation\n\n* On macOS, with Homebrew: `brew install lvillani/tap/ansible-tools`;\n* With Pip: `pip install --user ansible-tools`;\n\nIt is best, however, to install `ansible-tools` in a Virtualenv, along with the version of Ansible\nyou are using.\n\n# Overview\n\n- `ansible-vault-helper`: Used by users to setup keyring integration, called by Ansible to obtain a\n  Vault unlock password.\n- `vaultify`: Wraps Ansible commands such as `ansible`, `ansible-playbook` and `ansible-playbook` so\n  that the Vault is automatically unlocked with the password stored in the system's keyring.\n- `ansible-local`: Wrapper to run Ansible locally.\n- `ansible-mkpasswd`: Generates an encrypted password that can be used with the user module (see also\n  [here](https://docs.ansible.com/ansible/latest/reference_appendices/faq.html#how-do-i-generate-encrypted-passwords-for-the-user-module))\n\n# Usage\n\nGo to the same directory that contains your playbooks and then run:\n\n    ansible-vault-helper --update\n\nYou will be prompted for a vault name (which can be anything) and the unlock password. The former is\nstored in `ansible.cfg` alongside your playbooks, the latter is securely stored in your keyring.\n\nAt this point you can run Ansible as usual but precede the command with `vaultify`. That is, to\nstart a playbook run:\n\n    vaultify ansible-playbook site.yml\n\nWe also ship a tool to easily apply a playbook on the current system called `ansible-local` which is\ncomposable with `vaultify`.\n\n# Aliases\n\nHere's a list of handy shell aliases to make your life easier. They were tested on fish but should\nwork also on Bash and Zsh:\n\n    alias v=\"vaultify\"\n    alias ansible=\"vaultify ansible\"\n    alias ansible-playbook=\"vaultify ansible-playbook\"\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Keyring integration and local execution wrappers for Ansible",
    "version": "0.5.0",
    "project_urls": {
        "Homepage": "https://github.com/lvillani/ansible-tools"
    },
    "split_keywords": [
        "ansible",
        " keyring",
        " local",
        " tools",
        " wrapper"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "24d053193caaa88cd39f4c8fccdb137db32974132946e90865a0e7455428ceba",
                "md5": "2e3673ce936f7344e1b209ae44b8580d",
                "sha256": "e871fcd23e47f8e818270f08216732d979818149f2af560f1ad04387550b600d"
            },
            "downloads": -1,
            "filename": "ansible_tools-0.5.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "2e3673ce936f7344e1b209ae44b8580d",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 10591,
            "upload_time": "2025-02-26T13:53:49",
            "upload_time_iso_8601": "2025-02-26T13:53:49.378863Z",
            "url": "https://files.pythonhosted.org/packages/24/d0/53193caaa88cd39f4c8fccdb137db32974132946e90865a0e7455428ceba/ansible_tools-0.5.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "06f9b9a1bf674aa155207c9ac76c7ea9f3caee377e764291a1981f333ffdc03b",
                "md5": "8805a464a6cfeb9ece1a57127ecad5eb",
                "sha256": "f9f6fd6a6b3878294d3c621f44abd1abfe8dd9920dd4016aaacfde52a7e3514c"
            },
            "downloads": -1,
            "filename": "ansible_tools-0.5.0.tar.gz",
            "has_sig": false,
            "md5_digest": "8805a464a6cfeb9ece1a57127ecad5eb",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 17649,
            "upload_time": "2025-02-26T13:53:51",
            "upload_time_iso_8601": "2025-02-26T13:53:51.229377Z",
            "url": "https://files.pythonhosted.org/packages/06/f9/b9a1bf674aa155207c9ac76c7ea9f3caee377e764291a1981f333ffdc03b/ansible_tools-0.5.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-02-26 13:53:51",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "lvillani",
    "github_project": "ansible-tools",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "ansible-tools"
}
        
Elapsed time: 0.41274s