Skip to end of banner
Go to start of banner

Automation with Ansible

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 26 Next »

Dear Customer, the RevolutionPi is based on an open source platform, which can lead to misbehavior of the devices. To solve some problems, you can use Ansible. Because Ansible is all about automation, it requires instructions to accomplish each job. With everything written down in simple script form, it's easy to do version control and automate repetitive tasks with relative ease. Regardless of whether it is a single system or many. It is available as open source software under the GNU General Public License for DevOps around the world.

Preparation

especially for Windows users

  • Installing “Ubuntu on Windows” on your Windows computer. Downloadable from the Microsoft Store
  • After the installation, enter the following commands on your Ubuntu Terminal:
sudo apt update
sudo apt install ansible tree

We have a repository on Github where all the essential elements for solving the tasks are stored. This repository can be reached through this link https://github.com/RevolutionPi/revpi-ansible-recipes.

  • Apply the instructions below to be prepared to run an Ansible script.
git clone https://github.com/RevolutionPi/revpi-ansible-recipes.git
cd revpi-ansible-recipes/roles

With the command ls -l, you can see the names of all the files that govern the different tasks. If you know the name of the files that governs your task, please write it down. For our example, we will use the REVPI-Switch.yml.

  • The "Inventory" must be adjusted. In the inventory, you must enter the IP address of your target system. All devices on which the tasks are to be executed must be entered under [bet] as shown below (see the picture inventory adjustment)

First, type the following command in terminal of ubuntu on windows

sudo nano inventory
  • Now run the Ansible script in terminal of ubuntu on windows
ansible-playbook -i inventory -u pi REVPI-Switch.yml

  • No labels