This assumes you have installed Ansible.
Control Node / Managed Node
Ansible is used to perform tasks on one or more target system. For example, one possible task could be to install software on a system. The system that Ansible is installed on is known as the Control Node, and the target systems are known as the Managed Node or host.
Command Line Tools (CLI)
Typically, tasks are performed using the `ansible` command or the `ansible-playbook` command.
The ansible command is used to perform an ad-hoc task, which is a single task. For example, the ansible command can be used to ping all managed nodes.
ansible all -m ping
The ansible-playbook command is used for orchestration, which is just a fancy way of saying to perform one or more tasks. For example, the ansible-playbook command could be used to set up an HTTPD web server, where the series of tasks could be to install the HTTPD software, configure the web server, and then start and enable the web server.
At a very high level, Ansible commands takes two pieces of input:
The ansible-playbook command is used to perform the tasks in a playbook. A playbook is a YAML file, such as foo.yml or bar.yaml. The YAML file will contain a series of tasks. For example, the httpd.yml playbook would probably consists of tasks to download the HTTPD installation files, to install HTTPD, and to then start and enable the HTTPD web server. Refer to Getting Started with Playbook to better understand playbooks.
Defining Managed Nodes (hosts / inventory)
Managed nodes are defined in inventory. There are various ways to define your inventory:
Ansible uses Python to perform tasks and expects the Python command line tool to be located at /usr/bin/python. The ansible --version command can be used to determine the version of Python the control node is using.
By default, Ansible uses SSH to connect to the managed node(s). This can be changed to some other protocol. However, assuming you'll be using SSH, you must be able to make an SSH connection from the control node to the managed node(s). Refer to our article on Getting Started with SSH to understand how to configure Ansible and your managed nodes for SSH.