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 in Linux Administration by anonymous
• 120 points

edited Oct 29 by MD 64 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

answered Oct 29 by akhtar
• 32,960 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,280 points
93 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,280 points
145 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
904 views
0 votes
2 answers

How do I find all files containing specific text on Linux?

grep -rnw 'text to find recursively inside ...READ MORE

answered May 20, 2019 in Linux Administration by Ritesh Singh
14,337 views
0 votes
1 answer
+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 26, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
803 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 13 in Linux Administration by akhtar
• 32,960 points
71 views