Can we patch azure linux vm using ansible

0 votes

Is there any way to patch Azure Linux VM using ansible? Basically, we need to classify the 'critical' & 'security' patches and then patch the VM.

Oct 29, 2020 in Linux Administration by anonymous
• 120 points

edited Oct 29, 2020 by MD 1,999 views

Hi,

Can you explain your requirement a little bit more? If you are trying to provision a VM in your oracle virtual box with Ansible, then it may not be possible. But you can do the same in the cloud.

I had a Cent OS Vm in Azure and I need to patch it with Ansible.

1 answer to this question.

0 votes

Hi@avinash,

You can connect your Azure VM from Ansible. For that, you need to install the Azure SDK. After that you have to configure the credentials in your Ansible.

You can also go through the official document of Ansible.

https://docs.ansible.com/ansible/latest/scenario_guides/guide_azure.html

Hope it helps!

To know more about Azure, join Azure course today.

Thank you!!

answered Oct 29, 2020 by akhtar
• 38,260 points
Thanks for the information shared .I am able to provision resources using above link but the challenge is about the patching .I havent find anything related to patch or update the azure vms?

Hi@avinash,

Explain your use case a little more. Most of the modules are idempotent in nature in Ansible. If you update something, ansible will automatically connect to your VM and update the requirement in your VM as well.

@Akhtar

We need to develop an automatic process with ansible.

This process will perform 2 actions:

1- automatically retrieve in a variable the list of critical and major patches to apply to VMs.

2- use this variable to start the upgrade on the VMs

Hi@avinash,

Ansible is not working as a monitoring tool. It will perform your task if you run your ansible-playbook. You can also use the patch module in Ansible. For more information, you can go through the below link.

https://opensource.com/article/18/3/ansible-patch-systems

Related Questions In Linux Administration

0 votes
1 answer

Linux: Using grep to display filenames

You need t use -l flag with ...READ MORE

answered May 24, 2019 in Linux Administration by ajs3033
• 7,300 points
770 views
0 votes
1 answer

How to send mail using linux shell script?

If you've already configured the server, with ...READ MORE

answered Jun 11, 2019 in Linux Administration by ajs3033
• 7,300 points
1,210 views
0 votes
1 answer

To attach a file using mail command on Linux

$ echo | mutt -a syslogs.tar.gz admin@domain.org READ MORE

answered Jun 28, 2019 in Linux Administration by Upasana
• 8,620 points
2,827 views
0 votes
0 answers

How can I kill a process by name instead of PID, on Linux?

Sometimes when I try to start Firefox ...READ MORE

Apr 13, 2022 in Linux Administration by Rahul
• 9,680 points
433 views
0 votes
0 answers

Can't remove a linux directory using linux terminal

I've been trying to remove an unwanted ...READ MORE

Apr 14, 2022 in Linux Administration by Soham
• 9,710 points
314 views
+15 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 27, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
3,987 views
+2 votes
1 answer
0 votes
1 answer

How to create a group in Linux system?

Hi@MD, On Linux, group information is held in the /etc/group file. ...READ MORE

answered Aug 14, 2020 in Linux Administration by akhtar
• 38,260 points
814 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP