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

Creating a machine in Rackspace Cloud is very simple since it's a single-step operation:

  1. Create the rax.yaml Playbook with the following content:
---- hosts: localhost  tasks:    - name: Ensure the my_machine exists      rax:        name: my_machine        flavor: 4        image: centos-8        count: 1        group: my_group        wait: True
  1. Now, you can execute it with the following command:
$ ansible-playbook rax.yaml
  1. This should result in something like the following:
PLAY [localhost] **********************************************************************************TASK [Gathering Facts] ****************************************************************************ok: [localhost]TASK [Ensure the my_machine exists] *************************************************************** ...
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