APNIC 56 Network Automation tutorial
Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Back to homepage

Configure Semaphore & run playbooks

Access Ansible Semaphore over the address: https://s01.apnic56.anuragbhatia.com as setup in previous step.


Step 1 - Login

Login using the username & password as defined in docker-compose.yml in SEMAPHORE_ADMIN_NAME and SEMAPHORE_ADMIN_PASSWORD.


Step 2 - Create project

Create project named btnog10 and click create.


Step 3 - Add credentials

  1. Go to “Key Store” from left sidebar and click on “New Key” from top right.
  2. Enter keyname “a01”
  3. Select type “SSH key”
  4. Add username “a01”
  5. Paste your private SSH key from the server. You can get private key using cat ~/.ssh/id_rsa

Step 4 - Create repository

Click on Repositories on the left sidebar and click on “New repository” from top right.

Instructions for repo:

  1. Type name “Gitlab”
  2. Add the SSH URL from your Gitlab repo. Go to your Gitlab project, click “Clone” and copy the URL from “Clone with SSH”
  3. Type branch name “main”
  4. Select the access key as created in step 3.
  5. Click create

Step 5 - Create environment

  1. Click on “Environment” from left side bar
  2. Use name “default”
  3. In the “Extra variables” add the value {} and click save.

Step 6 - Add inventory

  1. Click on “Inventory” from left side bar
  2. Use the name “inventory
  3. Select credentials as created in step 3.
  4. Type file
  5. Provide the inventory location as per your Gitlab repo location and click save.

Step 7 - Add task

  1. Click on “Task Templates” from left sidebar
  2. In the new template screen give the name “vyos basic setup”
  3. Leave description empty or add anything logical there
  4. Give the playbook name with location in reference to the Git repo
  5. Select values for inventory, repository, environment as setup in previous steps.
  6. Leave vault password empty and click create

Step 8 - Run the job

In “Task templates” on left sidebar, click “Run” for the job you created.