Giter Club home page Giter Club logo

ansible's Introduction

ansible-w

ansible vagrant

Запускаем виртуальные хосты

  1. vagrant up, vagrant status

Проверяем доступность хостов

  1. ansible -m ping all -i hosts/inventory.yml

Запускаем модуль shell: вводим команду на одном из хостов

3.ansible -i hosts/inventory.yml -m shell -a 'uname -a' 192.168.28.71

Модуль copy позволяет копировать из управляющей машины на удаленные

4.ansible -i hosts/inventory.yml -m copy -a 'src=/путь/от/куда/ dest=/путь/куда/' 192.168.28.71

Куча полезных модулей http://docs.ansible.com/ansible/latest/list_of_all_modules.html

Выбор хостов all означает «все хосты», еще примеры:

  • host0.example.org:host1.example.org будет запущен на host0.example.org и на host1.example.org
  • host*.example.org будет запущен на всех хостах, названия которых начинается с 'host' и заканчивается на '.example.org' (тоже как в shell)

ansible's People

Contributors

djwoms 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.