Skip to Content
Practical Ansible 2
book

Practical Ansible 2

by Daniel Oh, James Freeman, Fabio Alessandro Locati
June 2020
Intermediate to advanced
410 pages
9h 52m
English
Packt Publishing
Content preview from Practical Ansible 2

Creating your first machine

Now that Ansible is able to connect to your Azure environment, you can proceed with the actual Playbook:

  1. Create the azure.yaml Playbook with the following content:
---- hosts: localhost  tasks:    - name: Ensure the Storage Account is present      azure_rm_storageaccount:        resource_group: Testing        name: mysa        account_type: Standard_LRS    - name: Ensure the Virtual Network is present      azure_rm_virtualnetwork:        resource_group: Testing        name: myvn        address_prefixes: "10.10.0.0/16"    - name: Ensure the Subnet is present      azure_rm_subnet:        resource_group: Testing        name: mysn        address_prefix: "10.10.0.0/24"        virtual_network: myvn    - name: Ensure that the Public IP is set      azure_rm_publicipaddress:        resource_group: Testing allocation_method: Static ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Mastering Ansible - Third Edition

Mastering Ansible - Third Edition

James Freeman, Jesse Keating
Security Automation with Ansible 2

Security Automation with Ansible 2

Akash Mahajan, MADHU AKULA

Publisher Resources

ISBN: 9781789807462Supplemental Content