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)
Simple ssh overlay for easy, remote server management written in Python GTK with paramiko

Simple "ssh" overlay for easy, remote server management written in Python GTK with paramiko

kłapouch 3 May 1, 2022
pyinfra automates infrastructure super fast at massive scale. It can be used for ad-hoc command execution, service deployment, configuration management and more.

pyinfra automates/provisions/manages/deploys infrastructure super fast at massive scale. It can be used for ad-hoc command execution, service deployme

Nick Barrett 2.1k Dec 29, 2022
Software to automate the management and configuration of any infrastructure or application at scale. Get access to the Salt software package repository here:

Latest Salt Documentation Open an issue (bug report, feature request, etc.) Salt is the world’s fastest, most intelligent and scalable automation engi

SaltStack 12.9k Jan 4, 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 7, 2022
Simple, Pythonic remote execution and deployment.

Welcome to Fabric! Fabric is a high level Python (2.7, 3.4+) library designed to execute shell commands remotely over SSH, yielding useful Python obje

Fabric 13.8k Jan 6, 2023
SSH tunnels to remote server.

Author: Pahaz Repo: https://github.com/pahaz/sshtunnel/ Inspired by https://github.com/jmagnusson/bgtunnel, which doesn't work on Windows. See also: h

Pavel White 1k Dec 28, 2022
CTF infrastructure deployment automation tool.

CTF infrastructure deployment automation tool. Focus on the challenges. Mirrored from

Fake News 1 Apr 12, 2022
Manage your SSH like a boss.

--- storm is a command line tool to manage your ssh connections. features adding, editing, deleting, listing, searching across your SSHConfig. command

Emre Yılmaz 3.9k Jan 3, 2023
Linux, Jenkins, AWS, SRE, Prometheus, Docker, Python, Ansible, Git, Kubernetes, Terraform, OpenStack, SQL, NoSQL, Azure, GCP, DNS, Elastic, Network, Virtualization. DevOps Interview Questions

Linux, Jenkins, AWS, SRE, Prometheus, Docker, Python, Ansible, Git, Kubernetes, Terraform, OpenStack, SQL, NoSQL, Azure, GCP, DNS, Elastic, Network, Virtualization. DevOps Interview Questions

Arie Bregman 35.1k Jan 2, 2023
IP address management (IPAM) and data center infrastructure management (DCIM) tool.

NetBox is an IP address management (IPAM) and data center infrastructure management (DCIM) tool. Initially conceived by the network engineering team a

NetBox Community 11.8k Jan 7, 2023
Asynchronous parallel SSH client library.

parallel-ssh Asynchronous parallel SSH client library. Run SSH commands over many - hundreds/hundreds of thousands - number of servers asynchronously

null 1.1k Dec 31, 2022
SSH to WebSockets Bridge

wssh wssh is a SSH to WebSockets Bridge that lets you invoke a remote shell using nothing but HTTP. The client connecting to wssh doesn't need to spea

Andrea Luzzardi 1.3k Dec 25, 2022
Deploy a simple Multi-Node Clickhouse Cluster with docker-compose in minutes.

Simple Multi Node Clickhouse Cluster I hate those single-node clickhouse clusters and manually installation, I mean, why should we: Running multiple c

Nova Kwok 11 Nov 18, 2022
Spinnaker is an open source, multi-cloud continuous delivery platform for releasing software changes with high velocity and confidence.

Welcome to the Spinnaker Project Spinnaker is an open-source continuous delivery platform for releasing software changes with high velocity and confid

null 8.8k Jan 7, 2023
Cobbler is a versatile Linux deployment server

Cobbler Cobbler is a Linux installation server that allows for rapid setup of network installation environments. It glues together and automates many

Cobbler 2.4k Dec 24, 2022
Get Response Of Container Deployment Kube with python

get-response-of-container-deployment-kube 概要 get-response-of-container-deployment-kube は、例えばエッジコンピューティング環境のコンテナデプロイメントシステムにおいて、デプロイ元の端末がデプロイ先のコンテナデプロイ

Latona, Inc. 3 Nov 5, 2021
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
Coding For Entrepreneurs 100 Jan 1, 2023
This projects provides the documentation and the automation(code) for the Oracle EMEA WLA COA Demo UseCase.

COA DevOps Training UseCase This projects provides the documentation and the automation(code) for the Oracle EMEA WLA COA Demo UseCase. Demo environme

Cosmin Tudor 1 Jan 28, 2022