Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Running the Ansible script

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.

Code Block
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 folders that govern the different tasks. If you know the name of the folder that governs your task, please write it down. For our example, we will use the Revpi-switch folder to perform the task that uses Revpi as a switch.

...

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

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

Code Block
sudo nano inventory

...

  •  Now run the Ansible script in terminal of ubuntu on windows
Code Block
ansible-playbook -i inventory -u pi Test2.yml

...

Example 1: To ping a device

...