Posts

Showing posts with the label ansible service module

Ansible Tags - Controls Tasks

Image
 Ansible playbook can be a construct of multiple plays or each play may contains multiple tasks. This is where we may have situation where you need to add new task to the existing play or playbook, and we need to test many times that newly added task.  While testing multiple times we many don't want to execute certain tasks such as a task 'Send email notification' when you preparing a 'Reboot of server' or 'Restart of Service' or 'Deployment of a service'. During the testing time you may want to exclude these notification tasks.  There are situations where we might want to run a particular task as per the input at the run time of a playbook. This may be from AWX/Tower UI select them. Ansible tags - to control the tasks of a Playbook I will be explaining in this post, How to run or not to run a particular task in given  playbook.  Important concepts about Ansible tags Ansible tags are keys to identify and control the tasks for execution or exclude fr...

Ansible packages and service modules

Image
Ansible packages and service modules In this post I would like to take you to the most important Linux administration tasks which can be used regularly in their daily activities that can be automated with Ansible.  How do Linux Package Managers works? Every Linux Operating system allow us to install any software using package managers such as yum, dnf, apt, deb or apk any other option.  Here I've explored more details about this package mangers how they are working. If we take RedHat flavor Linux systems such as CentOS, SuSe, RHEL uses actually RPM as package manager. But the CLI clients are available such as yum (Yellowdog updater modified) and in the latest versions using improved yum that is dnf command utility which is known as "Dandified Yum".  The service or systemctl commands After installation we need to start, stop or restart or check status that service using systemctl or service command as per the System availability. Ansible package manager modules connectio...