Skip to Content
Implementing Modern DevOps
book

Implementing Modern DevOps

by David Gonzalez, Danny Varghese
October 2017
Intermediate to advanced
326 pages
7h 20m
English
Packt Publishing
Content preview from Implementing Modern DevOps

Ansible remote facts

Remote facts in Ansible are a way to specify configuration on remote hosts either by an explicit configuration file or by a script that returns data about the server. In general, this feature is very useful for operations such as maintenance, setting up flags that specifically mark the host as out of the pool so that our playbooks have no effect in the hosts.

Take a look at the following command (assuming the inventory from the previous example is present in the folder and the VM is running on Google Cloud Platform):

ansible all -m setup -i inventory --user=root

This will output an enormous amount of data (JSON-formatted data). This data is all the known facts about the remote host, such as the CPU type, machine ID, network ...

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

Practical DevOps

Practical DevOps

joakim verona
Hands-On Security in DevOps

Hands-On Security in DevOps

Tony Hsiang-Chih Hsu
SRE with Java Microservices

SRE with Java Microservices

Jonathan Schneider

Publisher Resources

ISBN: 9781786466877Supplemental Content