![]() |
VOOZH | about |
Configuration management systems are designed to streamline the process of controlling large numbers of servers, for administrators and operations teams. They allow you to control many different systems in an automated way from one central location.
While there are many popular configuration management tools available for Linux systems, such as Chef and Puppet, these are often more complex than many people want or need. Ansible is a great alternative to these options because it offers a simple architecture that doesn’t require special software to be installed on nodes, using SSH to execute the automation tasks and YAML files to define provisioning details.
In this guide, we will discuss how to install Ansible on an Ubuntu 18.04 server and go over some basics of how to use this software.
Thanks for learning with the DigitalOcean Community. Check out our offerings for compute, storage, networking, and managed databases.
Former Technical Writer at DigitalOcean. Focused on SysAdmin topics including Debian 11, Ubuntu 22.04, Ubuntu 20.04, Databases, SQL and PostgreSQL.
Dev/Ops passionate about open source, PHP, and Linux. Former Senior Technical Writer at DigitalOcean. Areas of expertise include LAMP Stack, Ubuntu, Debian 11, Linux, Ansible, and more.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
hello dear people how can i get here your_server_ip (alias ansible_ssh_host = your_server_ip) Find Thnx
My experience was that I had to softlink python3 to python for this to work on Ubuntu 18.04 or ansible would complain that it couldn’t find /usr/bin/python on each droplet:
root@my-droplet$sudo ln -s /usr/bin/python3 /usr/bin/python
I also found that I needed to enter the pass phrase for the ssh cert once per server. After receiving the reply from the first server, I entered the pass phrase even though there was no prompt and this seemed to make it work.
It is probably better to configure the certificate at playbook level rather than globally in any case.
Getting error while doing Ansible-Playbook
host1 | FAILED! => { “changed”: false, “module_stderr”: “Shared connection to 172.31.8.238 closed.\r\n”, “module_stdout”: “/bin/sh: 1: /usr/bin/python: not found\r\n”, “msg”: “MODULE FAILURE\nSee stdout/stderr for the exact error”, “rc”: 127 }
already i have python version Python 2.7.15rc1
ansible_ssh_port deosn’t work anymore with ansibile 2.0 and later version.
Below link for reference.
https://docs.ansible.com/ansible/2.3/intro_inventory.html
Ansible 2.0 has deprecated the “ssh” from ansible_ssh_user, ansible_ssh_host, and ansible_ssh_port to become ansible_user, ansible_host, and ansible_port. If you are using a version of Ansible prior to 2.0, you should continue using the older style variables (ansible_ssh_*). These shorter variables are ignored, without warning, in older versions of Ansible.```
Hello Team,
Under one of my Ansible host, I am unable to locate authorized_keys within the ~/.ssh directory.
KIndly help
Thanks for this! I setup 2 Ubuntu droplets on DO and was able to get everything working by following your tutorial… worked great. I’ll be reading your others, on creating playbooks and such, next.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.