Difference between revisions of "ansible notes"

From thelinuxwiki
Jump to: navigation, search
Line 6: Line 6:
 
==[https://docs.ansible.com/ansible/latest/inventory_guide/intro_inventory.html#variables-in-inventory Adding variables to inventory]==
 
==[https://docs.ansible.com/ansible/latest/inventory_guide/intro_inventory.html#variables-in-inventory Adding variables to inventory]==
  
 +
==Connecting to hosts==
 +
 +
===[https://docs.ansible.com/ansible/latest/vault_guide/vault.html#vault Ansible Vault]===
 +
Find out how to encrypt sensitive content in your inventory such as passwords and keys.
  
Connecting to hosts: behavioral inventory parameters
 
  
 
variable ansible_connection
 
variable ansible_connection

Revision as of 01:11, 21 February 2024

https://www.redhat.com/en/services/training/ex457-red-hat-certified-specialist-in-ansible-network-automation-exam?section=objectives

Contents

installation

pip install ansible

Adding variables to inventory

Connecting to hosts

Ansible Vault

Find out how to encrypt sensitive content in your inventory such as passwords and keys.


variable ansible_connection

listing connection types/plugins

$ ansible-doc -t connection -l
kubectl      Execute tasks in pods running on Kubernetes                                                                                      
libvirt_lxc  Run tasks in lxc containers via libvirt                                                                                          
chroot       Interact with local chroot                                                                                                       
psrp         Run tasks over Microsoft PowerShell Remoting Protocol                                                                            
network_cli  Use network_cli to run command on network appliances                                                                             
vmware_tools Execute tasks inside a VM via VMware Tools                                                                                       
ssh          connect via ssh client binary                                                                                                    
httpapi      Use httpapi to run command on network appliances                                                                                 
docker       Run tasks in docker containers                                                                                                   
...