FreeKB - Ansible articles
Ansible articles

Getting Started with Ansibleansible-doc commandGetting Started with the ansible-doc commandansible-doc becomeansible-doc connectionansible-doc inventoryansible-doc modulesansible-doc shellansible-doc strategyansible-playbook commandGetting Started with the ansible-playbook commandansible-playbook version commandVerbose Flags (-v -vv -vvv)ansible command (ad-hoc task)Getting Started with the ansible commandansible --version commandAnsible GalaxyGetting Started with Ansible GalaxyAnsible Galaxy websiteansible-galaxy info commandansible-galaxy init commandansible-galaxy install commandansible-galaxy list commandansible-galaxy login commandansible-galaxy remove commandansible-galaxy search commandansible-galaxy setup commandansible-galaxy version commandAnsible Lintansible-lintAnsible Vault--vault-id command line option--vault-password-file command line optionAnsible Vault password fileansible-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 commandArraysGetting Started with Arrays Dictionary ListsAppend values to an Array Dictionary ListLooping through an Array Dictionary ListBecomeansible_become ansible_become_user ansible_become_pass variables (sudo)Become and --vault-password-file command line optionbecome command line (--become --become-user --become-method --ask-become-pass --become-flags)become directives in ansible.cfgbecome parameter (sudo)Understanding Become Privilege EscalationDry Run--check (dry run) command line flagFilesConfiguration file (ansible.cfg)FiltersGetting Started with Filtersb64decode filterb64encode filtercapitalize first charactercut characters from a string (index)first filter (first value in an array list)int filter (integers math)last filter (last value in an array list)length filterlower filtermax filter (greatest value in array)min filter (lowest value in array)regex_escaperegex_findallregex_replaceregex_searchreplace filterround filtersort filtersplit (cut a string into pieces)strftime filtertitle upper case first charactertrim whitespacetype_debug filter (integer, boolean, string)upper filterHashesGetting Started with Hashes (key value pairs)Looping through an HashInstallInstall Ansible on Linux using pipInstall Ansible on Linux using yumInstall Ansible Tower on LinuxInstall ansible-lint on Linux using pipUninstall Ansible on Linux using pipUninstall Ansible TowerInventory--list-hosts command line optionansible-inventory --graph commandansible-inventory --list commandDefining your inventoryRun a playbook against certain managed nodes (hosts -i --limit)Inventory (dynamic)Getting Started with the Dynamic Inventoryadvanced_host_list dynamic inventory pluginCobbler dynamic inventory scripthost_list dynamic inventory pluginini dynamic inventory pluginnmap dynamic inventory pluginvmware_vm_inventory dynamic inventory pluginyaml dynamic inventory pluginInventory (static)Create your own inventory fileDefault hosts fileInventory file format (INI YAML)Inventory groups (all | ungrouped | other)Jinja2Jinja2 templatingJSONGetting Started parsing JSONLoop through JSON arrayStore JSON value in variableLogsGetting Started with Logs (log_path)Magic VariablesGetting Started with Magic Variablesansible_date_time magic variableANSIBLE_DEBUG variableansible_default_ipv4 magic variableansible_distribution magic variableansible_distribution_major_version magic variableansible_distribution_version magic variableansible_hostname magic variableansible_limit magic variableansible_play_batch magic variableansible_play_hosts magic variableansible_play_hosts_all magic variablehostvars magic variableinventory_hostname magic variableinventory_hostname_short magic variableplaybook_dir magic variableplay_hosts magic variableMetameta clear_host_errors (continue fail fatal)meta end_playModulesarchive module (tar zip bzip2 gzip)authorized_key moduleblockinfile module (edit file)command module (invoking a command)copy modulecron modulecurl moduledebug module (printing output to the console)fail modulefile 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 (delete remove file)file module (remove directory rmdir)find module (list files and directories)firewalld moduleget_url moduleHostname moduleimport_playbook moduleinclude_tasks moduleiptables moduleknown_hosts modulelineinfile module (edit file)mail module (send email)move modulemysql_db moduleopenssh_cert moduleopenssh_keypair moduleping modulepip moduleraw module (execute a command)rename 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)shell module (write local file)slurp module (read file)stat module (file statistics)systemd module (start stop restart services)unarchive module (tar zip bzip2 gzip)uri moduleuser moduleuser module (create keypair)user module (groups)yum module (install update package)yum module (list available installed packages)yum module (uninstall delete remove package)Module Utilitiesmodule_utilsParameterschanged_when parameter check_mode parameter (dry run)connection parameterdelay parameter delegate_to parameter (run task on specific server)failed_when parameter (skip tasks)group parameter ignore_errors paramaterlocal_action parameterloop parameter (loop through items)mode parameter module_defaults parameterowner parameter recurse parameterregister parameter (stdout stderr rc)remote_src parameterremote_user parameterretries parameter run_once parameterselevel parameter (SELinux)serole parameter (SELinux)setype parameter (SELinux)seuser parameter (SELinux)until parameter (loop)validate parameterwarnings parameter (warn: true, warn: false)when directory is empty or not emptywhen file or directory exists or does not exist (out.stat.exists)when file or directory is writeable (out.stat.writeable)when object is or is not a directory (out.stat.isdir)when parameter (if else statement)when variable is defined or not definedwhen variable is empty or not emptywith_items parameter (loop through items)with_list parameter (loop through items)with_nested loop parameterwith_sequence parameterplaybooksGetting Started with playbooksPluginsgather_facts pluginHandlers Notify Pluginlookup plugin (date time)lookup plugin (env user home directory)lookup plugin (env user whoami)lookup plugin (read local file)Pythonansible command python versionansible_python_interpreter variableRetryRetry fileRolesGetting Started with RolesDownload role using the git clone commandinclude_rolepost_taskspre_tasksRole DependenciesRole Duplication (allow_duplicates)Role FilesRole TemplatesRole VariablesSSHGetting Started with SSH--ask-pass (SSH) command line flag--connection command line flag/etc/ansible/hosts file SSH (ansible_user ansible_ssh_pass)Using an encrypted password with SSHTagsGetting Started with TagsTask ExecutionGetting Started with Task Execution--forks command line option--list-tasks command line optionforks in ansible.cfgFree StrategyLinear StrategyparallelismTerminologyidempotentTowerGetting Started with TowerAdd managed hosts to static inventory in TowerCreate Job Schedule in TowerCreate Job Template in TowerCreate Project in TowerCreate static Inventory in TowerDelete Job Template in TowerDelete Project in TowerDelete static Inventory in TowerGet latest SCM revisionJob template extra variables in TowerRemove managed hosts to static inventory in TowerStart Job Template in TowerStart Stop Restart Ansible TowerViewing Completed JobsTroubleshootingResolve "Destination not writable"Resolve "Failed to connect to the host via ssh Permission denied"Resolve "Failed to parse foo.yml with foo plugin"Resolve "non-zero return code"Resolve "There was an issue creating as requested: [Erroro 13] Permission denied"VariablesGetting Started with variables-e --extra-vars (variables) command line optiongroup_vars variablesinclude_varslookup plugin varsNested Variablesnull variablesVariables in /etc/ansible/hosts or your own inventory filevars plugin (variables, arrays, lists)vars_files plugin