gaqwriters.blogg.se

Ansible make install
Ansible make install









The psycopg2-binary is used to interact with PostgreSQL. name: Install python-postgres packages packages We will install pip if it is not already installed, we are making use of shell module to run the command on the target server. Installing pip and psycopg2-binary with Ansible In this playbook we are specifying our hosts, setting some variables that will be used for the DB creation, under task's we are using the yum module to install dependencies and packages, here we are also making sure we have the latest version of python installed. name: install postgres on RHEL based distros We will begin with installing PostgreSQL from the default repository manager. We are good to proceed if we receive pong in response. "discovered_interpreter_python": "/usr/bin/python" Next, to identify if we have correctly setup everything, let's use the Ansible ping module to make sure connectivity between the host server and our remote/target server can be established ansible all -i hosts -m ping To override the default file and use project-specific ansible configuration, we can edit the ansible.cfg file ġ3.127.121.45 ansible_ssh_private_key_file=your.pem ansible_ssh_user=ec2-userĪnsible expects the host file in the default directory which is /etc/ansible/hosts. Mention your target server's IP address, Ansible username, Ansible password, or private pem key file in. Servers can be grouped into meaningful sets like webservers, application servers etc.įor this tutorial, let's name it as pgserver mkdir -p. The inventory file is a placeholder where we specify the information of the target server(s), where we intend to install a package or software. Refer to the guide on How to Install Ansible and python Step 1. A user with sudo privileges should be created.

ansible make install

  • Python should be installed in the target server.
  • Python and Ansible should be installed in the host machine.
  • ansible make install

    We will create an Ansible playbook to install PostgreSQL on the server. PostgreSQL is a popular Relational Database with advantages of concurrency without read locks, creating partial indexes and table inheritance. In this post, we will learn how to install and configure PostgreSQL on Centos/Redhat.











    Ansible make install