Skip to content

Instantly share code, notes, and snippets.

@amaurybsouza
Created October 19, 2022 12:42
Show Gist options
  • Save amaurybsouza/e540f37154625e7c7a08e4b59d7dec3e to your computer and use it in GitHub Desktop.
Save amaurybsouza/e540f37154625e7c7a08e4b59d7dec3e to your computer and use it in GitHub Desktop.
azure-cli-ansible
---
- name: Installing Azure CLI
hosts: local
gather_facts: false
become: true
tasks:
- name: Upgrade all packages
yum:
name: '*'
state: latest
- name: teste playbook
command:
rpm --import https://packages.microsoft.com/keys/microsoft.asc
- name: Add the repository
shell: |
echo -e "[azure-cli]
name=Azure CLI
baseurl=https://packages.microsoft.com/yumrepos/azure-cli
enabled=1
gpgcheck=1
gpgkey=https://packages.microsoft.com/keys/microsoft.asc" | sudo tee /etc/yum.repos.d/azure-cli.repo
- name: Install Azure CLI
yum:
name: azure-cli
state: latest
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment