Warning: session_start(): open(/tmp/sess_f587a3fb93cd624a37deaf196aff37be, O_RDWR) failed: No space left on device (28) in /var/www/html/inc/init.php on line 265

Warning: session_start(): Failed to read session data: files (path: ) in /var/www/html/inc/init.php on line 265

Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/inc/init.php:265) in /var/www/html/inc/auth.php on line 432

Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/inc/init.php:265) in /var/www/html/inc/actions.php on line 38
ansible [Ben's notes]

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