Ansible is a radically simple IT automation platform that makes your applications and systems easier to deploy and maintain. Automate everything from code deployment to network configuration to cloud management, in a language that approaches plain English, using SSH, with no agents to install on remote systems. https://docs.ansible.com.

Overview

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, but 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.

Comments
  • Suppress traceback when bad escape is used (ansible#79364)

    Suppress traceback when bad escape is used (ansible#79364)

    SUMMARY

    Launch module.fail_json when a bad escape is used as suggested by Sivel My first attemps of contribution, if I did anything wrong, I'm sorry in advance, just tell and I'll correct

    ISSUE TYPE
    • Bugfix Pull Request
    COMPONENT NAME

    replace

    ADDITIONAL INFORMATION

    Reused test playbook from a-mastermov :

    - name: Test replace module error
      hosts: localhost
      gather_facts: no
    
      tasks:
        - name: Test replace with bad escape
          replace:
            path: /dev/null
            after: ^
            before: $
            regexp: \.
            replace: '\D'
    

    Run ansible-playbook : ansible-playbook replace.yml

    Before change

    [WARNING]: You are running the development version of Ansible. You should only run Ansible from "devel" if you are modifying the Ansible engine, or trying out features under development. This is a rapidly changing source of code and can
    become unstable at any point.
    [WARNING]: No inventory was parsed, only implicit localhost is available
    [WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match 'all'
    
    PLAY [Test replace module error] *************************************************************************************************************************************************************************************************************
    
    TASK [Test replace with bad escape] **********************************************************************************************************************************************************************************************************
    An exception occurred during task execution. To see the full traceback, use -vvv. The error was: re.error: bad escape \D at position 0
    fatal: [localhost]: FAILED! => {"changed": false, "module_stderr": "Traceback (most recent call last):\n  File \"/home/rperso/.ansible/tmp/ansible-tmp-1672693525.1035416-14540-219985575953942/AnsiballZ_replace.py\", line 107, in <module>\n    _ansiballz_main()\n  File \"/home/rperso/.ansible/tmp/ansible-tmp-1672693525.1035416-14540-219985575953942/AnsiballZ_replace.py\", line 99, in _ansiballz_main\n    invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n  File \"/home/rperso/.ansible/tmp/ansible-tmp-1672693525.1035416-14540-219985575953942/AnsiballZ_replace.py\", line 47, in invoke_module\n    runpy.run_module(mod_name='ansible.modules.replace', init_globals=dict(_module_fqn='ansible.modules.replace', _modlib_path=modlib_path),\n  File \"<frozen runpy>\", line 226, in run_module\n  File \"<frozen runpy>\", line 98, in _run_module_code\n  File \"<frozen runpy>\", line 88, in _run_code\n  File \"/tmp/ansible_replace_payload_amppazku/ansible_replace_payload.zip/ansible/modules/replace.py\", line 317, in <module>\n  File \"/tmp/ansible_replace_payload_amppazku/ansible_replace_payload.zip/ansible/modules/replace.py\", line 287, in main\n  File \"/usr/lib64/python3.11/re/__init__.py\", line 196, in subn\n    return _compile(pattern, flags).subn(repl, string, count)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/usr/lib64/python3.11/re/__init__.py\", line 317, in _subx\n    template = _compile_repl(template, pattern)\n               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/usr/lib64/python3.11/re/__init__.py\", line 308, in _compile_repl\n    return _parser.parse_template(repl, pattern)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/usr/lib64/python3.11/re/_parser.py\", line 1078, in parse_template\n    raise s.error('bad escape %s' % this, len(this)) from None\nre.error: bad escape \\D at position 0\n", "module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1}
    
    PLAY RECAP ***********************************************************************************************************************************************************************************************************************************
    localhost                  : ok=0    changed=0    unreachable=0    failed=1    skipped=0    rescued=0    ignored=0   
    
    
    

    After change

    [WARNING]: You are running the development version of Ansible. You should only run Ansible from "devel" if you are modifying the Ansible engine, or trying out features under development. This is a rapidly changing source of code and can
    become unstable at any point.
    [WARNING]: No inventory was parsed, only implicit localhost is available
    [WARNING]: provided hosts list is empty, only localhost is available. Note that the implicit localhost does not match 'all'
    
    PLAY [Test replace module error] *************************************************************************************************************************************************************************************************************
    
    TASK [Test replace with bad escape] **********************************************************************************************************************************************************************************************************
    fatal: [localhost]: FAILED! => {"changed": false, "msg": "bad escape \\D at position 0"}
    
    PLAY RECAP ***********************************************************************************************************************************************************************************************************************************
    localhost                  : ok=0    changed=0    unreachable=0    failed=1    skipped=0    rescued=0    ignored=0   
    
    module needs_triage new_contributor bug traceback small_patch affects_2.15 
    opened by redisded 0
  • ansible-test disallows an underscore as a variable name

    ansible-test disallows an underscore as a variable name

    Summary

    I have noticed that pylint (ansible-test sanity) marks as a disallowed name a single underscore. Using a single underscore for a variable that is not used is a widely code convention. Is this a bug or intended?

    Example:

    import asyncio
    
    proc = await asyncio.subprocess.create_subprocess_shell("echo hello", stdout=asyncio.subprocess.PIPE, stderr=asyncio.subprocess.PIPE)
    await proc.wait()
    if proc.returncode != 0:
        _, stderr = await proc.communicate()
        print(f"ERROR: {stderr}")
    

    Issue Type

    Bug Report

    Component Name

    ansible-test

    Ansible Version

    core 2.13.5
    

    Configuration

    default
    

    OS / Environment

    any

    Steps to Reproduce

    run ansible-test sanity against this code:

    import asyncio
    
    proc = await asyncio.subprocess.create_subprocess_shell("echo hello", stdout=asyncio.subprocess.PIPE, stderr=asyncio.subprocess.PIPE)
    await proc.wait()
    if proc.returncode != 0:
        _, stderr = await proc.communicate()
        print(f"ERROR: {stderr}")
    

    Expected Results

    No errors

    Actual Results

    ERROR: Found 1 pylint issue(s) which need to be resolved:
    ERROR: example.py: disallowed-name: Disallowed name "_"
    

    Code of Conduct

    • [X] I agree to follow the Ansible Code of Conduct
    needs_triage bug affects_2.13 
    opened by Alex-Izquierdo 1
  • Documentation landing page lacks call to action

    Documentation landing page lacks call to action

    Summary

    Summary

    Getting started documentation is difficult to find from the landing page if you don't know the proper terms of what you should be looking for.


    Consider use case:

    "I have heard what Ansible can do but don't know how to use it or how to get started with it. I have some hosting experience, so I know the best approach is the official documentation even thought there are plenty of third party tutorials."

    What happens currently:

    When someone lands on https://docs.ansible.com/index.html they are greeted with three main "cards" on the usual focus area where the main content usually appears. All of the three options are equally colored suggesting equal importance and they are titled with technical terms that only an experienced Ansible proressional would know the meaning of in Ansible's case.

    In this case the user should know to click the first card titled Ansible Community, but unless they bother to read the description the initial impression is that this link is going to redirect them to some sort of an forum - or a community version of Ansible whatever that is, since the use case does not yet know that.

    And even if they read the description they will still be confused between the first and second card since the second option sounds like it's going to give a overall picture of an ecosystem where all features of Ansible are used.

    There is a card with higher visual importance and that's going to redirect the newcomer to even more choices and possibly entirely off docs.ansible.com

    I did share similar use case as my example one (with the exception that I was applying for a job with Ansible in requirements), now I have used Ansible for quite much longer and in my current docs use case I know somewhat okay what those terms on the landing page mean and I am somewhat quickly able to find the correct section of the documentation, so I don't need to visit the landing page.

    I think the primary function of an landing page in documentation should be to guide the novice user getting started with the documented thing in question

    Suggested action for improvement

    Improve discoverability of the getting started guide by adding "Get started with Ansible" card to the landing page of docs.ansible.com with a link to this page: https://docs.ansible.com/ansible/latest/getting_started/index.html . The card should have high priority in the visual hierarchy to act as the "call to action".

    Issue Type

    Documentation Report

    Component Name

    unknown

    Ansible Version

    ansible [core 2.14.1]
      config file = None
      configured module search path = ['/not-applicable']
      ansible python module location = /not-applicable
      ansible collection location = /not-applicable
      executable location = /not-applicable
      python version = 3.10.9 (main, Dec  7 2022, 00:00:00) [GCC 12.2.1 20221121 (Red Hat 12.2.1-4)] (/usr/bin/python3)
      jinja version = 3.1.2
      libyaml = True
    

    Configuration

    CONFIG_FILE() = None
    

    OS / Environment

    Browser (any)

    Additional Information

    In summary

    Code of Conduct

    • [X] I agree to follow the Ansible Code of Conduct
    needs_triage docs affects_2.14 
    opened by jimboolio 2
  • systemd: suppress daemon_reload and daemon_reexec when running in a chroot

    systemd: suppress daemon_reload and daemon_reexec when running in a chroot

    SUMMARY

    This turns the systemd module's daemon_reload and daemon_reexec commands into no-ops when the target is a chroot.

    This is needed as the chroot doesn't run systemd, which will make any module invocation containing one of those two commands fail with something like "systemd isn't active". This is what you get without this PR.

    ISSUE TYPE
    • Bugfix Pull Request
    COMPONENT NAME

    systemd module

    ADDITIONAL INFORMATION

    The patch assumes that if the target is a chroot, it doesn't run systemd. I'm not sure if this is always the case; there might be people out there that somehow run systemd in a chroot, if this is at all possible/feasible. For those people, daemon_reload and daemon_reexec would work properly without this PR, and do nothing with the PR. So a cleaner solution that would cover this case might be to actually detect a running/active systemd rather than a chroot. Still, without this PR, the much more common case of someone trying to run systemd daemon_reload against a chroot will fail, which seems to be the more severe problem for me (my use case was https://github.com/multi-io/armbox, which uses Armbian to debootstrap a Debian system for ARM boards in a chroot, then uses Ansible to provision it).

    module needs_triage new_contributor bug small_patch affects_2.15 
    opened by multi-io 3
  • Fix issue #79639

    Fix issue #79639

    Closes #79639

    SUMMARY

    This pull request fixes #79639 by re ordering chdir in codes

    ISSUE TYPE
    • Bugfix Pull Request
    COMPONENT NAME

    except.py from lib/ansible/modules/expect.py

    module needs_triage new_contributor bug affects_2.15 
    opened by itspooya 0
  • Fix typo

    Fix typo

    SUMMARY

    Fix Typo in Arch Linux name

    ISSUE TYPE
    • Docs Pull Request

    +label: docsite_pr

    SUMMARY
    ISSUE TYPE
    • Bugfix Pull Request
    • Docs Pull Request
    • Feature Pull Request
    • Test Pull Request
    COMPONENT NAME
    ADDITIONAL INFORMATION
    
    
    needs_triage new_contributor docs small_patch docs_only affects_2.15 
    opened by KristopherKram 1
Releases(v2.5.0b1)
framework providing automatic constructions of vulnerable infrastructures

中文 | English 1 Introduction Metarget = meta- + target, a framework providing automatic constructions of vulnerable infrastructures, used to deploy sim

rambolized 685 Dec 28, 2022
A honey token manager and alert system for AWS.

SpaceSiren SpaceSiren is a honey token manager and alert system for AWS. With this fully serverless application, you can create and manage honey token

287 Nov 09, 2022
A curated list of awesome DataOps tools

Awesome DataOps A curated list of awesome DataOps tools. Awesome DataOps Data Catalog Data Exploration Data Ingestion Data Lake Data Processing Data Q

Kelvin S. do Prado 40 Dec 23, 2022
Remote Desktop Protocol in Twisted Python

RDPY Remote Desktop Protocol in twisted python. RDPY is a pure Python implementation of the Microsoft RDP (Remote Desktop Protocol) protocol (client a

Sylvain Peyrefitte 1.6k Dec 30, 2022
Azure plugins for Feast (FEAture STore)

Feast on Azure This project provides resources to enable running a feast feature store on Azure. Feast Azure Provider The Feast Azure provider acts li

Microsoft Azure 70 Dec 31, 2022
Tools and Docker images to make a fast Ruby on Rails development environment

Tools and Docker images to make a fast Ruby on Rails development environment. With the production templates, moving from development to production will be seamless.

1 Nov 13, 2022
Deploying a production-ready Django project using Nginx and Gunicorn

django-nginx-gunicorn This project is for deploying a production-ready Django project using Nginx and Gunicorn. Running a local server of Django is no

Arash Sayareh 8 Jul 03, 2022
This is a tool to develop, build and test PHP extensions in Docker containers.

Develop, Build and Test PHP Extensions This is a tool to develop, build and test PHP extensions in Docker containers. Installation Clone this reposito

Suora GmbH 10 Oct 22, 2022
Prometheus exporter for AWS Simple Queue Service (SQS)

Prometheus SQS Exporter Prometheus exporter for AWS Simple Queue Service (SQS) Metrics Metric Description ApproximateNumberOfMessages Returns the appr

Gabriel M. Dutra 0 Jan 31, 2022
DC/OS - The Datacenter Operating System

DC/OS - The Datacenter Operating System The easiest way to run microservices, big data, and containers in production. What is DC/OS? Like traditional

DC/OS 2.3k Jan 06, 2023
Nagios status monitor for your desktop.

Nagstamon Nagstamon is a status monitor for the desktop. It connects to multiple Nagios, Icinga, Opsview, Centreon, Op5 Monitor/Ninja, Checkmk Multisi

Henri Wahl 361 Jan 05, 2023
Bash-based Python-venv convenience wrapper

venvrc Bash-based Python-venv convenience wrapper. Demo Install Copy venvrc file to ~/.venvrc, and add the following line to your ~/.bashrc file: # so

1 Dec 29, 2022
Let's learn how to build, release and operate your containerized applications to Amazon ECS and AWS Fargate using AWS Copilot.

🚀 Welcome to AWS Copilot Workshop In this workshop, you'll learn how to build, release and operate your containerised applications to Amazon ECS and

Donnie Prakoso 15 Jul 14, 2022
docker-compose工程部署时的辅助脚本

okta-cmd Introduction docker-compose 辅助脚本

完美风暴666 4 Dec 09, 2021
Ajenti Core and stock plugins

Ajenti is a Linux & BSD modular server admin panel. Ajenti 2 provides a new interface and a better architecture, developed with Python3 and AngularJS.

Ajenti Project 7k Jan 03, 2023
Ansible Collection: A collection of Ansible Modules and Lookup Plugins (MLP) from Linuxfabrik.

ansible_mlp An Ansible collection of Ansible Modules and Lookup Plugins (MLP) from Linuxfabrik. Ansible Bitwarden Item Lookup Plugin Returns a passwor

Linuxfabrik 2 Feb 07, 2022
Wiremind Kubernetes helper

Wiremind Kubernetes helper This Python library is a high-level set of Kubernetes Helpers allowing either to manage individual standard Kubernetes cont

Wiremind 3 Oct 09, 2021
Python utility function to communicate with a subprocess using iterables: for when data is too big to fit in memory and has to be streamed

iterable-subprocess Python utility function to communicate with a subprocess using iterables: for when data is too big to fit in memory and has to be

Department for International Trade 5 Jul 10, 2022
Build Netbox as a Docker container

netbox-docker The Github repository houses the components needed to build Netbox as a Docker container. Images are built using this code and are relea

Farshad Nick 1 Dec 18, 2021
Convenient tool to manage multiple VMs at once using libvirt

Convenient tool to manage multiple VMs at once using libvirt Installing To install the tool and its dependencies: pip install -e . Getting completion

Cedric Bosdonnat 13 Nov 11, 2022