AT command : Running one time future task
Unlike the the cron job is mainly used to schedule repetitive tasks, the “at” command is used to run a command just once, but schedule at a later time. That yum package to be installed…
Unlike the the cron job is mainly used to schedule repetitive tasks, the “at” command is used to run a command just once, but schedule at a later time. That yum package to be installed…
Ansible allows admins to add lines to files. The below playbook adds a sudoers configuration file, and adds an entry to allow users of group “webadmin” sudo to all users and execute all commands as root….
In order for a user to ssh to a remote node, usually some form of authentication such as user credentials, SSH keys, etc are required. However Linux provides provision for password-less authentication too once a…
When a user access a remote node using ssh for the first time, a prompt will appear asking the following: This key is not known by any other names. Are you sure you want to continue…
In this section we will try to understand few of the operations we can do using User module. In the below example, we will create anew user named shiju in the managed node, and will…
While ansible runs playbook on group of managed nodes which are also present in the Inventory file, we can run tasks on selected nodes based on defined conditions. For example we may want to install…
Roles is a feature provided by Ansible were once a standardized directory structure is created, you can automatically load related vars, files, tasks, handlers, and other Ansible artifacts. Using roles we have opportunities to reuse code from playbooks that…
The include_tasks module imports a list of tasks to the current playbook for execution. It is one way for organizing tasks in separate files and it also helps in reusing the tasks in other playbooks….
While the copy module helps to copy a file from the controller node to managed nodes, the fetch module helps to retrieve files from a managed node to controller node. In the below example we will…
Usually the Handlers work with a single task. However the “blocks” feature in Ansible helps us to group multiple tasks under one block section and attach handlers or rescue feature to it. In the below…