Coder Social home page Coder Social logo

ansible-shell's Introduction

As of Ansible 2.1 ansible-shell is part of the official ansible release: https://github.com/ansible/ansible/blob/devel/lib/ansible/cli/console.py

ansible-shell   buildstatus

Interactive shell for Ansible with built-in tab completion for all the modules.

This version works with 1.x version of ansible.

yolo

Installation

For the latest release version:

$ pip install ansible-shell

For the latest development version:

$ pip install git+https://github.com/dominis/ansible-shell.git#egg=ansible-shell

You can upgrade an existing installation by specifying an --upgrade option with the same command for whichever method you used above.

If you wish to hack on ansible-shell, you can install with pip's "editable" mode -- the ansible-shell command available on your system will be linked to your working copy of the code:

$ git clone https://github.com/dominis/ansible-shell.git
$ pip install -e ./ansible-shell

See the pip documentation if you need to learn more about pip.

Available commands:

cd
become
forks
list
list groups
serial
!  - force shell module instead of the ansible module of the same name (!yum update -y)

Usage:

[root@aaa ~]# ansible-shell --one-line
Welcome to the ansible-shell.
Type help or ? to list commands.

ansible# /> cd app-pool
ansible# /app-pool (12)> list
app01.bfc.kinja.com
app02.bfc.kinja.com
app03.bfc.kinja.com
app04.bfc.kinja.com
app05.bfc.kinja.com
app06.bfc.kinja.com
app07.bfc.kinja.com
app08.bfc.kinja.com
app09.bfc.kinja.com
app10.bfc.kinja.com
app11.bfc.kinja.com
app12.bfc.kinja.com
ansible# /app-pool (12)> date
UP ***********
app12.bfc.kinja.com >>> Fri May 24 12:01:20 EDT 2013
app04.bfc.kinja.com >>> Fri May 24 12:01:19 EDT 2013
app07.bfc.kinja.com >>> Fri May 24 12:01:19 EDT 2013
app06.bfc.kinja.com >>> Fri May 24 12:01:19 EDT 2013
app08.bfc.kinja.com >>> Fri May 24 12:01:20 EDT 2013
app10.bfc.kinja.com >>> Fri May 24 12:01:20 EDT 2013
app11.bfc.kinja.com >>> Fri May 24 12:01:20 EDT 2013
app09.bfc.kinja.com >>> Fri May 24 12:01:20 EDT 2013
app05.bfc.kinja.com >>> Fri May 24 12:01:19 EDT 2013
app01.bfc.kinja.com >>> Fri May 24 12:01:19 EDT 2013
app03.bfc.kinja.com >>> Fri May 24 12:01:19 EDT 2013
app02.bfc.kinja.com >>> Fri May 24 12:01:19 EDT 2013
FAILED *******
DOWN *********
ansible# /app-pool (12)> <TAB>
Display all 100 possibilities? (y or n)
EOF                  cd                   exit                 group_by             macports             openbsd_pkg          rabbitmq_parameter   service              virt
add_host             cloudformation       facter               help                 mail                 opkg                 rabbitmq_plugin      set_fact             wait_for
apt                  command              fail                 hg                   mongodb_user         osx_say              rabbitmq_user        setup                yum
apt_key              copy                 fetch                hipchat              mount                pacman               rabbitmq_vhost       shell                zfs
apt_repository       cron                 file                 homebrew             mqtt                 pause                raw                  slurp
assemble             debug                filesystem           ini_file             mysql_db             ping                 rax                  subversion
async_status         django_manage        fireball             irc                  mysql_user           pip                  rhn_channel          supervisorctl
async_wrapper        easy_install         flowdock             jabber               nagios               pkgin                riak                 svr4pkg
authorized_key       ec2                  gem                  lineinfile           netscaler            pkgng                s3                   sysctl
bigip_pool           ec2_elb              get_url              list                 newrelic_deployment  postgresql_db        script               template
bzr                  ec2_facts            git                  lvg                  npm                  postgresql_privs     seboolean            uri
campfire             ec2_vol              group                lvol                 ohai                 postgresql_user      selinux              user
ansible# /app-pool (12)> netscaler <TAB>
action        name          nsc_host      nsc_protocol  password      type          user
ansible# /app-pool (12)> netscaler nsc_

ansible-shell's People

Contributors

dominis avatar tamsky avatar ches avatar iambocai avatar milk avatar sampeng87 avatar ktosiek avatar trbs avatar alisaifee avatar aboyett avatar iamfat avatar dimaburmistrov avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.