Coder Social home page Coder Social logo

ansible-quickstart's Introduction

The install procedure on Ubuntu 22:

sudo apt update 
sudo apt install software-properties-common 
sudo add-apt-repository --yes --update ppa:ansible/ansible 
sudo apt install ansible

After installing, the ansible and ansible-playbook commands become available:

ansible-playbook -i -kK [--list-hosts, --list-tasks] [-t, --limit <hosts_group>]

  • i - inventory file (eg. example_hosts)
  • k - ask user for ssh password
  • K - ask user for escalation password
  • --list-hosts and/or --list-tasks - the playbook won't run but will show what hosts and tasks will be run

Inventory example_hosts file specifies hosts that can be "played" on. For example, with an entry:

some_server1 

ansible will try connecting with SSH using DNS hostname(some_server1) unless You specify IP with ansible_host variable:

some_server1 ansible_host=XX.XX.XX.XX

Variables in plays and tasks are taken from group_vars and host_vars but can also be supplied from command line when running ansible command. Their precedence can be found at: https://docs.ansible.com/ansible/latest/playbook_guide/playbooks_variables.html#variable-precedence-where-should-i-put-a-variable

ansible-quickstart's People

Contributors

mpodles avatar

Watchers

 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.