Hello everybody) In this post I will show you how to work with ansible module ios_command. What is ios_command module do? It sends a show command to an IOS device and returns the result of the command. The ios_command module does not support sending commands in configuration mode. For this, a separate module is used […]
Ansible modules for working with network devices
In this post, we will look at CLI modules that work with network devices. Globally, modules for working with network equipment can be divided into two parts: modules for API-enabled equipment modules for equipment that only works via CLI For CLI-only hardware, Ansible supports these three types of modules: os_command – execute show commands os_facts […]
Working with module execution results in Ansible.
In this post discusses several ways that you can look at the output received from devices. We will be using the raw module, but the same principles apply to other modules as well. One way to display the output of commands has already been used is the verbose flag. Detailed example of running a playbook […]
How to use varianbles in ansible?
Vars A variable could be, for example: Variable names Ansible has certain restrictions on the format of variable names: In addition, you can create dictionaries with variables (in YAML format): SWITCH1: There are two ways to access variables in a dictionary: SWITCH1[‘IP’] SWITCH1.IP But when using the second option, there may be problems if the […]
Reset Root Superuser Password in Centos 7 or 8
Sometimes it happens that system administrators forget the superuser password or, for example, a server which there is no information. In these cases, we need to figure out what kind of server it is and what service is running on it. But how to get into the system if we do not have a password? […]
Playbooks basics in ansible
A playbook (script file) is a file that describes the actions to be performed on a group of hosts. Inside the playbook: play is a set of tasks to be performed for a group of hosts task is a specific task. The task contains at least: – description (task name can be omitted, but it […]
What is ansible modules?
In this post I want to explain you about ansible modules. Along with the installation of ansible, a large number of modules (module library) are also created. The module library has about 200 modules available. Module it’s like extension for ansible. A module is usually responsible for its specific and small task. Modules can be […]
Ad Hoc commands in ansible
With ad-hoc command you can run some Ansible action from the command line. An example ad-hoc command: This option basically is used in cases where you need to check something, for example, the operation of the module. Or just perform some one-time action that does not need to be saved. Anyway, this is a simple […]
What is ansible? Terminology, inventory.
Works without installing an agent on managed hosts Uses SSH to connect to managed hosts Performs changes using Python modules that run on managed hosts Can perform actions locally on the management host Uses YAML to describe scenarios Contains many modules (their number is constantly growing) Easy to write your own modules Terminology Ansible Control […]
How to use systemctl and systemd in linux
With the systemd subsystem came the systemctl command. It allows you to manage the main Linux processes. It is cheat sheet of the most used commands. General Syntax Without options, systemctl lists running services, mount points, devices, and other units. Cheat sheet on frequently used systemctl commands How to view status service: Start the service: […]