Versions Compared

Key

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

...

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

...

all contents of the order revpi-ansible-recipes

...

  •  A "Inventory" must be adjustedcreated. 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

Code Block
sudo nano inventory

Enter the following declarations into the inventory

Code Block
[target]
localhost

[revpi]
<ip-adress of your host> remote_user=pi ansible_python_interpreter=/usr/bin/python3

...

For our example, we use the role network-bridge. To see all available roles

Code Block
cd roles

then

Code Block
ls -l

...

At the moment of editing this tutorial, there is only one role in the repository: network-bridge.

Now get back to the last order revpi-ansible-recipes and editing the new ansible-script (myplaybook.yml) to perform the task for the role network-bridge.

Code Block
cd ..
sudo nano myplaybook.yml

...

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

...