Ben's notes

Linux, Unix, network, radio...

User Tools

Site Tools


ansible

Ansible - automation

Prerequisites:

  • EPEL repo.

Installation

  • Install ansible via EPEL repo.
    yum install ansible

or

  • Install latest version via git.
    # yum install python-setuptools
    $ git clone git://github.com/ansible/ansible.git
    $ cd ./ansible
    $ make rpm
    $ sudo yum localinstall ~/rpmbuild/ansible-*.noarch.rpm

Configure

  • Edit /etc/ansible/hosts
    192.168.1.50
    aserver.example.org
    bserver.example.org
  • Create ssh keys and setup the ssh-agent.
    $ ssh-agent bash
    $ ssh-add ~/.ssh/id_rsa
  • Ping all nodes.
    ansible all -m ping

Documentation

ansible.txt · Last modified: 2021/10/09 15:14 by 127.0.0.1