Differences between revisions 2 and 3
Revision 2 as of 2020-09-20 08:29:10
Size: 796
Editor: PieterSmit
Comment:
Revision 3 as of 2020-09-20 08:37:31
Size: 1006
Editor: PieterSmit
Comment:
Deletions are marked like this. Additions are marked like this.
Line 8: Line 8:
== Ansible ping host == == Ansible module ping host ==
Line 16: Line 16:
== Ansible module setup return facts about a host {{{
ansible myserver -i inventory.file -m setup

#Note: add "--tree /tmp/facts" to get facts from multiple servers in groupe, indexed by host
}}}

Ansible

  • DevOps automation framework.

  • What makes Ansible unique is not host agent, all done through ssh.

Ansible module ping host

  • ping/test connectivity, create inventory file, and run module ping.

    vi inventory.file
    [mygrp]
    myserver
    
    ansible mygrp -i inventory.file -m ping

== Ansible module setup return facts about a host

ansible myserver -i inventory.file -m setup

#Note: add "--tree /tmp/facts" to get facts from multiple servers in groupe, indexed by host

Ansible error's

  • 2020-09 [WARNING]: Unable to parse <file> as an inventory source

    • Debug with

      ansible --list-hosts all -i <file> -vvv
      • error seen "Skipping due to inventory source not existing or not being readable by the current user"
      • Apparently ansible tries to parse inventory files with different plugins, ini, yaml, etc.

Ansible (last edited 2023-09-06 00:52:04 by PieterSmit)