Ansible get started

  1. instalar ansible en vuestro maquina local. En mi caso, ubuntu:
sudo apt-get install -y ansible
  1. Configurar las ips de los hosts a gestionar con ansible:
sudo vim /etc/ansible/hosts

[TAG]
ip1
ip2
...
ipN
  1. Importante, se tiene que instalar python2 en todas las máquinas
ansible -m raw -a 'sudo pkg install -y python2' -u <<username>> <<ip>>
sudo pkg install -y python27
sudo ln -s /usr/local/bin/python2.7 python
sudo ln -s /usr/local/bin/python2.7 /usr/bin/python
  1. Crear el playbook que se desee

  2. Ejecutar el playbook

ansible-playbook <<playbook.yml>> -s -u <<username>> --extra-vars "ansible_sudo_pass=<<password>>"

Latest Posts

  • Ansible get started
    instalar ansible en vuestro maquina local. En mi caso, ubuntu: Configurar las ips de los hosts a gestionar con ansible: Importante, se…
    Read More →
  • Apache Tunning for Liferay
    vim /etc/sysconfig/httpd First change default prefork MPM for mutli-thread & multi-process worker MPM: vim /etc/httpd/conf/httpd.conf…
    Read More →
  • Liferay DXP migration
    Configure OLD 6.2 Liferay Portal in local env Get mysql dump and store in local filesystem Start mysql docker container with 6.2 liferay…
    Read More →
  • Redis high availavility installation
    Cookbook to install redis in high availability in master-slave tipology Install redis in a host &lt;APP_SERVER_1_IP> Fill form Configure…
    Read More →
  • Git for dummies
    The basis of any computer project is the SCM. Without a good SCM it will be difficult to reach a good port. So we want to show some first…
    Read More →