Skip to content

Instantly share code, notes, and snippets.

@duffney
Created February 24, 2021 18:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save duffney/7eb8612857410cbb534653e6ca3891e8 to your computer and use it in GitHub Desktop.
Save duffney/7eb8612857410cbb534653e6ca3891e8 to your computer and use it in GitHub Desktop.
configure-ansible-centos.sh
#!/bin/bash
# Update all packages that have available updates.
sudo yum update -y
# Install Python 3 and pip.
sudo yum install -y python3-pip
# Upgrade pip3.
sudo pip3 install --upgrade pip
# Install Ansible.
pip3 install ansible[azure]
# Install Ansible modules and plugins for interacting with Azure.
ansible-galaxy collection install azure.azcollection
# Install required modules for Ansible on Azure
wget https://raw.githubusercontent.com/ansible-collections/azure/dev/requirements-azure.txt
# Install Ansible modules
sudo pip3 install -r requirements-azure.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment