FreeKB - Ansible articles
Ansible articles

Getting Started with Ansibleansible-playbook commandGetting Started with the ansible-playbook commandansible-playbook version commandansible-vault commandansible-vault create commandansible-vault decrypt commandansible-vault edit commandansible-vault encrypt command ansible-vault encrypt_string commandansible-vault rekey command (change password)ansible-vault view commandansible commandGetting Started with the ansible commandansible command python versionansible command versionCommand Line Options and Flags--ask-pass and --ask-become-pass (SSH)--extra-vars (variables)--limit (limit target servers hosts)Connection Variablesansible_become ansible_become_user ansible_become_pass variables (sudo)ansible_date_time variableansible_hostname (local server hostname)Variables in /etc/ansible/hosts or your own inventory fileFiles/etc/ansible/hosts file SSHConfiguration file (ansible.cfg)HandlersHandlers NotifyInstallInstall Ansible on LinuxJSONGetting Started parsing JSONLoop through JSON arrayStore JSON value in variableLogsGetting Started with Logs (log_path)Modulesarchive module (tar zip bzip2 gzip)become module (sudo)command module (invoking a command)copy moduledebug module (printing output to the console)delegate_to module (run task on specific server)end_play modulefail module (skip tasks)failed_when module (skip tasks)file module (change owner group mode permissions chown chgrp chmod)file module (create a symbolic link symlink soft link)file module (create directory mkdir)file module (create file touch)file module (remove directory mkdir)file module (remove file)find module (list files and directories)gather_facts moduleimport_playbook moduleinclude_tasks modulelineinfile module (edit file)lookup module (read local file)loop module (loop through list)mail module (send email)meta clear_host_errors module (continue fail fatal)module_defaults moduleping modulepost_tasks modulepre_tasks moduleregister module (stdout stderr rc)remote_user modulereplace module (edit a file)script module (invoking a script)service module (start stop restart services chkconfig)set_fact moduleset_fact module (array of values)shell module (invoking a shell command)slurp module (read file)systemd module (start stop restart services)unarchive module (tar zip bzip2 gzip)until module (loop)vars module (variables)warnings module (warn: true, warn: false)when module (if else statement)when x.stat.exists module (determine if a file or directory exists)when x.stat.isdir module (determine if object is a directory)with_items module (loop through list)yum module (install package)yum module (list available installed packages)playbooksGetting Started with playbooksRegular Expressions (regex)escape wildcard in Regular Expressions (regex)regex_replaceRolesGetting Started with RolesRole DependenciesRoles with the when moduleSSHGetting Started with SSHUsing an encrypted password with SSHTagsGetting Started with TagsTarget Servers / Hosts / InventoryGetting Started with Target Servers / Hosts / InventoryTarget Servers / Hosts / Inventory file format (INI vs YAML)Target Servers / Hosts / Inventory groups (all | unmanaged | other)TroubleshootingResolve "Destination not writable"Resolve "Failed to connect to the host via ssh Permission denied"Resolve "non-zero return code"Resolve "There was an issue creating as requested: [Erroro 13] Permission denied"VariablesGetting Started with variablesansible_default_ipv4.address variableansible_distribution variableansible_distribution_major_version variableansible_distribution_version variablegroup_varshostvarsinventory_hostname variable (target server hostname)inventory_hostname_short variable (target server hostname)play_hosts variableweb browser consoleweb browser console