Gather facts from host

Collect all Ansible facts (OS, CPU, network) from a host

ansible <host> -i inventory -m setup | jq '._ansible_facts'

tool
ansible56 commands
tags
ansibledebug

More ansible commands

  • ansible-vault encrypt_string 'secret_value' --name 'db_password'

    Inline-encrypt a string for use in playbooks

  • ansible-vault encrypt vars/secrets.yml

    Encrypt an entire variable file with Ansible Vault

  • ansible-vault decrypt vars/secrets.yml

    Decrypt an Ansible Vault-encrypted file in place

  • ansible-vault view vars/secrets.yml

    View contents of vault-encrypted file without decrypting on disk

  • ansible-galaxy install -r requirements.yml -p roles/

    Download roles listed in requirements.yml to local roles dir

all 56 ansible commands