5. Ansible

Introduction

DevOps teams can automate their security and transform it into DevSecOps workflows using Ansible and Terraform.

Automate security responses to threats, provision both physical and virtualized next-generation firewalls and automate routine configuration tasks, saving time and reducing configuration errors.

Official Documentation for the Ansible Module can be found on this link.

Add & Delete Hosts with Ansible

Step

Instructions

1

From the Jump-Server , SSH into the Ubuntu-Orchestrator (root / Cpwins1!) using MobaXterm:

2

Change to the following directory :

cd /root/Ansible/

3

Review the file hosts.yml – view the hostname in the script :

cat add_hosts.yml

4

Open SmartConsole to the Network Objects > Hosts view.

5

Run the following command to execute the Ansible Play :

ansible-playbook add_hosts.yml

6

2 New Hosts were added :

7

Run the following command to remove the added hosts :

ansible-playbook remove_hosts.yml

The hosts should be deleted.