aster.cloud aster.cloud
  • /
  • Platforms
    • Public Cloud
    • On-Premise
    • Hybrid Cloud
    • Data
  • Architecture
    • Design
    • Solutions
    • Enterprise
  • Engineering
    • Automation
    • Software Engineering
    • Project Management
    • DevOps
  • Programming
  • Tools
  • About
  • /
  • Platforms
    • Public Cloud
    • On-Premise
    • Hybrid Cloud
    • Data
  • Architecture
    • Design
    • Solutions
    • Enterprise
  • Engineering
    • Automation
    • Software Engineering
    • Project Management
    • DevOps
  • Programming
  • Tools
  • About
aster.cloud aster.cloud
  • /
  • Platforms
    • Public Cloud
    • On-Premise
    • Hybrid Cloud
    • Data
  • Architecture
    • Design
    • Solutions
    • Enterprise
  • Engineering
    • Automation
    • Software Engineering
    • Project Management
    • DevOps
  • Programming
  • Tools
  • About
  • Platforms
  • Programming

How To Install Azure PIP Package For Ansible

  • root
  • October 10, 2019
  • 1 minute read

Overview

Ansible is an IT automation tool. It can configure systems, deploy software, and orchestrate more advanced IT tasks such as continuous deployments or zero downtime rolling updates. Ansible can be used to provision Azure resources.

 


Partner with aster.cloud
for your next big idea.
Let us know here.


cyberpogo

Prerequisites

  • Ubuntu 18.04
  • Ansible has been installed. See here on how to install.
  • Python has been installed. By default Python 2.x is installed on Ubuntu 18.04.
  • (Optional) Azure account for verification and testing.

 

Installation

01. Install the pip library for Ansible-Azure

$ pip install ansible[azure]

 

02. Install the Azure Preview Module

$ ansible-galaxy install azure.azure_preview_modules

 

03. Install the Azure Preview Module dependencies

$ pip install -r ~/.ansible/roles/azure.azure_preview_modules/files/requirements-azure.txt

 

Configuration

04. Update the Azure credentials on the OS user level. Create the directory for the credentials if not yet existing.

$ mkdir ~/.azure

 

05. Create the credentials file/configuration.

$ nano ~/.azure/credentials

 

06. Set the content as follows. To retrieve the Subscription ID, Client ID, Secret Key and Tenant ID, refer to this guide.


[default]

subscription_id=xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx

client_id=xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx

secret=xxxxxxxxxxxxxxxxx

tenant=xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx

 

Testing

07. Create a sample Ansible Playbook that creates a new Resource Group.

$ nano resource_group_create.yml

 

08. Set the content as follows

---
- name: Azure - Resource Group - Create
  hosts: localhost
  connection: local
  vars:
    resource_group: "rg-geek"
    location: southeastasia
  tasks:
  - name: Create a resource group
    azure_rm_resourcegroup:
      name: "{{ resource_group }}"
      location: "{{ location }}"
...

 

09. Run the Playbook

$ ansible-playbook resource_group_create.yml

 

10. Wait until the Playbook has completed its execution. The “Play Recap” section contains a summary of the resources created and updated.

 

Read More  Introducing Swift Async Algorithms

Our humans need coffee too! Your support is highly appreciated, thank you!

root

Related Topics
  • Ansible
  • Azure
  • PIP
  • Python
You May Also Like
View Post
  • Architecture
  • Platforms
  • Software
  • Solutions
  • Technology

What To Expect From Apple’s WWDC 2023

  • June 1, 2023
View Post
  • Platforms

Build Next-Generation, AI-Powered Applications On Microsoft Azure

  • May 26, 2023
View Post
  • Platforms
  • Solutions

MongoDB And Alibaba Cloud Extend Global Partnership

  • May 25, 2023
View Post
  • Programming
  • Software Engineering
  • Technology

Build a Python App to Alert You When Asteroids Are Close to Earth

  • May 22, 2023
View Post
  • Computing
  • Platforms

Oracle Cloud Infrastructure Adds To Growing List Of Government Approved Cloud Services

  • May 22, 2023
View Post
  • Programming

Illuminating Interactions: Visual State In Jetpack Compose

  • May 20, 2023
View Post
  • Engineering
  • People
  • Platforms

KubeCon Europe 2023 Highlights Kubernetes Explosion And Need For Instant Platform Engineering

  • May 17, 2023
View Post
  • Data
  • Platforms
  • Technology

Cloudflare’s R2 Is The Infrastructure Powering Leading AI Companies

  • May 16, 2023

Stay Connected!
LATEST
  • 1
    Amazing Federated Multicloud Apps
    • June 2, 2023
  • 2
    What’s The Future Of DevOps? You Tell Us. Take The 2023 Accelerate State Of DevOps Survey
    • June 2, 2023
  • 3
    Resolving Deployment Issues With Ts-node And Azure Development Pipelines
    • June 1, 2023
  • 4
    What To Expect From Apple’s WWDC 2023
    • June 1, 2023
  • 5
    What Is Platform Engineering And Why Adopt It In Your Company?
    • June 1, 2023
  • 6
    Four Steps To Managing Your Cloud Logging Costs On A Budget
    • May 31, 2023
  • 7
    Red Hat Puts Podman Container Management On The Desktop
    • May 30, 2023
  • 8
    The Agile Mindset: A Path to Personal Fulfillment and Growth
    • May 30, 2023
  • 9
    G7 2023: The Real Threat To The World Order Is Hypocrisy.
    • May 27, 2023
  • 10
    Build Next-Generation, AI-Powered Applications On Microsoft Azure
    • May 26, 2023
about
Hello World!

We are aster.cloud. We’re created by programmers for programmers.

Our site aims to provide guides, programming tips, reviews, and interesting materials for tech people and those who want to learn in general.

We would like to hear from you.

If you have any feedback, enquiries, or sponsorship request, kindly reach out to us at:

[email protected]
Most Popular
  • 1
    Huawei OceanStor Pacific Scale-Out Storage Tops IO500 Rankings
    • May 26, 2023
  • 2
    MongoDB And Alibaba Cloud Extend Global Partnership
    • May 25, 2023
  • 3
    Tricentis Launches Quality Engineering Community ShiftSync
    • May 23, 2023
  • 4
    Oracle Cloud Infrastructure Adds To Growing List Of Government Approved Cloud Services
    • May 22, 2023
  • 5
    Huawei And Partners Announce Yucatan Wildlife Conservation Findings
    • May 18, 2023
  • /
  • Technology
  • Tools
  • About
  • Contact Us

Input your search keywords and press Enter.