FreeKB - Ansible articles
Ansible articles

Getting Started with Ansibleansible-doc commandGetting Started with the ansible-doc commandansible-galaxy commandansible-galaxy init commandansible-galaxy install commandansible-galaxy list commandansible-galaxy remove commandansible-galaxy version commandansible-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 command (ad-hoc task)Getting Started with the ansible commandansible command python versionansible command versionAnsible GalaxyGetting Started with Ansible GalaxyAnsible Galaxy websiteCommand Line Options and Flags--ask-pass and --ask-become-pass (SSH) command line flag--check (dry run) command line flag--extra-vars (variables) command line option--forks command line option--limit (limit target servers hosts) command line optionConnection 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 LinuxInstall Ansible Tower on LinuxUninstall Ansible TowerJSONGetting Started parsing JSONLoop through JSON arrayStore JSON value in variableLogsGetting Started with Logs (log_path)Managed Nodes (hosts / inventory)Getting Started with Managed Nodes (hosts / inventory)Managed Nodes file format (INI vs YAML)Managed Nodes groups (all | unmanaged | other)Modulesarchive module (tar zip bzip2 gzip)become module (sudo)blockinfile module (edit file)changed_when modulecheck_mode (dry run)command module (invoking a command)connection modulecopy modulecurl 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 rmdir)file module (remove file)find module (list files and directories)gather_facts moduleget_url 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 modulemove moduleping modulepost_tasks modulepre_tasks moduleraw module (execute a command)register module (stdout stderr rc)remote_user modulerename modulereplace module (edit a file)script module (invoking a script)service module (start stop restart services chkconfig)setup module (gather facts)set_fact moduleset_fact module (array of values)shell module (invoking a shell command)slurp module (read file)stat module (file statistics)systemd module (start stop restart services)unarchive module (tar zip bzip2 gzip)until module (loop)uri modulevars 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)with_nested loopyum module (install package)yum module (list available installed packages)playbooksGetting Started with playbooksRegular Expressions (regex)escape wildcard in Regular Expressions (regex)regex_replacesplit (cut a string into pieces)RolesGetting Started with RolesRole DependenciesRole DuplicationRole VariablesRoles with the when moduleSSHGetting Started with SSHUsing an encrypted password with SSHStrategiesFree StrategyLinear StrategyTagsGetting Started with TagsTemplatesGetting Started with TemplatesTerminologyidempotentparallelismTowerGetting Started with TowerStart Stop Restart Ansible TowerTroubleshootingResolve "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 variableansible_python_interpreter variablegroup_vars variablehostvars variableinventory_hostname variable (managed node hostname)inventory_hostname_short variable (managed node hostname)play_hosts variableUpdate variable to lowercaseUpdate variable to uppercase