Skip to content

Ansible without requirements to be installed (for pull-mode)

License

Notifications You must be signed in to change notification settings

itsAkshayDubey/portable-ansible

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Self-contained Ansible distribution

Ansible package with required python modules. No need to install, just download, unpack and use. The main idea of this package is to run Ansible playbooks on local machine.

The distribution contains only ansible-base. The extra dependencies will need to be installed manually.

Changelog

All notable changes to this project are documented in the file CHANGELOG.md

How to install and use

Latest version of portable-ansible tarball (.tar.bz2) is available on Releases page https://github.com/ownport/portable-ansible/releases

wget https://github.com/ownport/portable-ansible/releases/download/<version>/portable-ansible-<version>-py3.tar.bz2 \
      -O ansible.tar.bz2

tar -xjf ansible.tar.bz2

python3 ansible localhost -m ping
 [WARNING]: provided hosts list is empty, only localhost is available

localhost | SUCCESS => {
    "changed": false,
    "ping": "pong"
}

Hints

If you need to run ansible playbooks, after having extracted the tarball contents run next commands to create aliases to portable ansible directory. In the examples below portable-ansible installed in /opt directory

python3 ansible-playbook playbook.yml

To have all the ansible commands, run:

for l in config console doc galaxy inventory playbook pull vault;do
  ln -s ansible ansible-$l
done

Supporting additional python packages

Install python packages into ansible/extras directory

pip3 install -t ansible/extras <package>

or

pip3 install -t ansible/extras -r requirements.txt

Instead of installing the python packages to ansible/extras, you can also install them in user directory to be available for ansible:

pip3 install --user -r requirements.txt

For developers

Please check this guideline

References

About

Ansible without requirements to be installed (for pull-mode)

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Shell 64.5%
  • Python 35.5%