{"id":8629,"date":"2016-07-26T04:21:33","date_gmt":"2016-07-26T02:21:33","guid":{"rendered":"https:\/\/www.dbi-services.com\/blog\/getting-started-with-ansible-download-the-postgresql-sources-compile-and-install\/"},"modified":"2016-07-26T04:21:33","modified_gmt":"2016-07-26T02:21:33","slug":"getting-started-with-ansible-download-the-postgresql-sources-compile-and-install","status":"publish","type":"post","link":"https:\/\/www.dbi-services.com\/blog\/getting-started-with-ansible-download-the-postgresql-sources-compile-and-install\/","title":{"rendered":"Getting started with Ansible \u2013 Download the PostgreSQL sources, compile and install"},"content":{"rendered":"<p>In the <a href=\"http:\/\/dbi-services.com\/blog\/getting-started-with-ansible-installing-os-packages-creating-groups-and-users\/\" target=\"_blank\" rel=\"noopener\">last post<\/a> in this series we looked at how you can instruct <a href=\"https:\/\/www.ansible.com\/\" target=\"_blank\" rel=\"noopener\">Ansible<\/a> to install packages on the operating system using the <a href=\"http:\/\/docs.ansible.com\/ansible\/yum_module.html\" target=\"_blank\" rel=\"noopener\">yum module<\/a> and how you can create groups and users by using the <a href=\"http:\/\/docs.ansible.com\/ansible\/group_module.html\" target=\"_blank\" rel=\"noopener\">group<\/a> and the <a href=\"http:\/\/docs.ansible.com\/ansible\/user_module.html\" target=\"_blank\" rel=\"noopener\">user<\/a> modules. In this post we&#8217;ll look at how you can download the PostgreSQL sources, compile and then finally install the binaries by extending our existing <a href=\"http:\/\/docs.ansible.com\/ansible\/playbooks.html\" target=\"_blank\" rel=\"noopener\">playbook<\/a>.<\/p>\n<p>If you remember the <a href=\"http:\/\/dbi-services.com\/blog\/getting-started-with-ansible-installing-os-packages-creating-groups-and-users\/\" target=\"_blank\" rel=\"noopener\">last post<\/a> our current Ansible playbook looks like this:<\/p>\n<pre class=\"brush: bash; gutter: true; first-line: 1\">\n[ansible@ansiblecontrol ansible]$ pwd\n\/opt\/ansible\n[ansible@ansiblecontrol ansible]$ cat roles\/postgresqldbserver\/tasks\/main.yml \n---\n- name: Install PostgreSQL dependencies\n  yum: name={{item}} state=present\n  with_items:\n   - gcc\n   - openldap-devel\n   - python-devel\n   - readline-devel\n   - openssl-devel\n   - redhat-lsb\n   - bison\n   - flex\n   - perl-ExtUtils-Embed\n   - zlib-devel\n   - crypto-utils\n   - openssl-devel\n   - pam-devel\n   - libxml2-devel\n   - libxslt-devel\n   - tcl\n   - tcl-devel\n   - openssh-clients\n   - bzip2\n   - net-tools\n   - wget\n   - screen\n   - ksh\n\n- name: Add PostgreSQL operating system group\n  group: name=postgressomegroup state=present\n\n- name: Add PostgreSQL operating system user\n  user: name=postgres comment=\"PostgreSQL binaries owner\" group=postgres\n<\/pre>\n<p>Basically we have three tasks:<\/p>\n<ul>\n<li>Install the required operating system packages<\/li>\n<li>Create the PostgreSQL operating system group<\/li>\n<li>Create the PostgreSQL operating system user<\/li>\n<\/ul>\n<p>The next task we want Ansible to do is to download the PostgreSQL sources. In this example we&#8217;ll download from the official PostgreSQL servers but if you do not have connectivity to the outside world this can be a local server in your company&#8217;s network as well. The module we&#8217;ll use for that is <a href=\"http:\/\/docs.ansible.com\/ansible\/get_url_module.html\" target=\"_blank\" rel=\"noopener\">get_url_module<\/a>. All we need to do is to add the following lines to our playbook:<\/p>\n<pre class=\"brush: bash; gutter: true; first-line: 1\">\n- name: Download the PostgreSQL 9.5.3 sources\n  get_url: url=https:\/\/ftp.postgresql.org\/pub\/source\/v9.5.3\/postgresql-9.5.3.tar.bz2 dest=\/var\/tmp mode=0755\n<\/pre>\n<p>Once we execute the playbook again:<\/p>\n<pre class=\"brush: bash; gutter: true; first-line: 1\">\n[ansible@ansiblecontrol ~]$ ansible-playbook -i \/opt\/ansible\/development \/opt\/ansible\/roles\/postgresqldbserver\/site.yml\n\nPLAY [postgresql-servers] ******************************************************\n\nTASK [setup] *******************************************************************\nok: [192.168.22.172]\nok: [192.168.22.171]\n\nTASK [postgresqldbserver : Install PostgreSQL dependencies] ********************\nok: [192.168.22.171] =&gt; (item=[u'gcc', u'openldap-devel', u'python-devel', u'readline-devel', u'openssl-devel', u'redhat-lsb', u'bison', u'flex', u'perl-ExtUtils-Embed', u'zlib-devel', u'crypto-utils', u'openssl-devel', u'pam-devel', u'libxml2-devel', u'libxslt-devel', u'tcl', u'tcl-devel', u'openssh-clients', u'bzip2', u'net-tools', u'wget', u'screen', u'ksh'])\nok: [192.168.22.172] =&gt; (item=[u'gcc', u'openldap-devel', u'python-devel', u'readline-devel', u'openssl-devel', u'redhat-lsb', u'bison', u'flex', u'perl-ExtUtils-Embed', u'zlib-devel', u'crypto-utils', u'openssl-devel', u'pam-devel', u'libxml2-devel', u'libxslt-devel', u'tcl', u'tcl-devel', u'openssh-clients', u'bzip2', u'net-tools', u'wget', u'screen', u'ksh'])\n\nTASK [postgresqldbserver : Add PostgreSQL operating system group] **************\nok: [192.168.22.172]\nok: [192.168.22.171]\n\nTASK [postgresqldbserver : Add PostgreSQL operating system user] ***************\nok: [192.168.22.172]\nok: [192.168.22.171]\n\nTASK [postgresqldbserver : Download the PostgreSQL 9.5.3 sources] **************\nchanged: [192.168.22.171]\nchanged: [192.168.22.172]\n\nPLAY RECAP *********************************************************************\n192.168.22.171             : ok=5    changed=1    unreachable=0    failed=0   \n192.168.22.172             : ok=5    changed=1    unreachable=0    failed=0   \n<\/pre>\n<p>The sources are available on the PostgreSQL hosts:<\/p>\n<pre class=\"brush: bash; gutter: true; first-line: 1\">\n[root@ansiblepg1 ~] ls \/var\/tmp\/post*\n\/var\/tmp\/postgresql-9.5.3.tar.bz2\n<\/pre>\n<p>Now we need to do some scripting as there is no pre-defined module for installing PostgreSQL from source. Here is a very basic script to do that:<\/p>\n<pre class=\"brush: bash; gutter: true; first-line: 1\">\n#!\/usr\/bin\/bash\nPGSOURCE=\"\/var\/tmp\/postgresql-9.5.3.tar.bz2\"\nPGUSER=\"postgres\"\nPGGROUP=\"postgres\"\nPGHOME=\"\/u01\/app\/postgres\/product\/95\/db_3\"\nSEGSIZE=2\nBLOCKSIZE=8\nmkdir -p \/u01\/app\nchown ${PGUSER}:${PGGROUP} \/u01\/app\nsu - ${PGUSER} -c \"cd \/var\/tmp\/; tar -axf ${PGSOURCE}\"\nsu - ${PGUSER} -c \"cd \/var\/tmp\/postgresql-9.5.3; .\/configure --prefix=${PGHOME} \n            --exec-prefix=${PGHOME} \n            --bindir=${PGHOME}\/bin \n            --libdir=${PGHOME}\/lib \n            --sysconfdir=${PGHOME}\/etc \n            --includedir=${PGHOME}\/include \n            --datarootdir=${PGHOME}\/share \n            --datadir=${PGHOME}\/share \n            --with-pgport=5432 \n            --with-perl \n            --with-python \n            --with-tcl \n            --with-openssl \n            --with-pam \n            --with-ldap \n            --with-libxml \n            --with-libxslt \n            --with-segsize=${SEGSIZE} \n            --with-blocksize=${BLOCKSIZE} \n            --with-wal-segsize=16  \n            --with-extra-version=\" dbi services build\"\"\nsu - ${PGUSER} -c \"cd \/var\/tmp\/postgresql-9.5.3; make world\"\nsu - ${PGUSER} -c \"cd \/var\/tmp\/postgresql-9.5.3; make install\"\nsu - ${PGUSER} -c \"cd \/var\/tmp\/postgresql-9.5.3\/contrib; make install\"\nrm -rf \/var\/tmp\/postgresql*\n<\/pre>\n<p>Place a file with this contents under the files directory of our role:<\/p>\n<pre class=\"brush: bash; gutter: true; first-line: 1\">\nroles\/postgresqldbserver\/files\/install_pg953.sh\n<\/pre>\n<p>There is another Ansible module called <a href=\"http:\/\/docs.ansible.com\/ansible\/copy_module.html\" target=\"_blank\" rel=\"noopener\">copy<\/a> which we now can use to copy the file from our roles directory to the target server. All we need to do is to add the following lines to our playbook:<\/p>\n<pre class=\"brush: bash; gutter: true; first-line: 1\">\n- name: Copy PostgreSQL install script to targets\n  copy: src=install_pg953.sh dest=\/var\/tmp\/install_pg953.sh owner=postgres group=postgres mode=\"u=rwx\"\n<\/pre>\n<p>Once we execute the playbook the file is distributed to all targets (here the check for the first node):<\/p>\n<pre class=\"brush: bash; gutter: true; first-line: 1\">\n[root@ansiblepg1 ~] ls \/var\/tmp\/install*\n\/var\/tmp\/install_pg953.sh\n<\/pre>\n<p>The only thing we need to do from now on to get PostgreSQL installed on the target system is to exexute this file. How can we do that? Very easy by using the <a href=\"http:\/\/docs.ansible.com\/ansible\/shell_module.html\" target=\"_blank\" rel=\"noopener\">shell module<\/a>. Add these lines to the playbook:<\/p>\n<pre class=\"brush: bash; gutter: true; first-line: 1\">\n- name: Compile and install PostgreSQL\n  shell: \/var\/tmp\/install_pg953.sh &gt;&gt; \/var\/tmp\/install_pg_log\n  args:\n    executable: \/usr\/bin\/bash\n<\/pre>\n<p>&#8230; re-execute the playbook:<\/p>\n<pre class=\"brush: bash; gutter: true; first-line: 1\">\n[ansible@ansiblecontrol ansible]$ ansible-playbook -i \/opt\/ansible\/development \/opt\/ansible\/roles\/postgresqldbserver\/site.yml\n\nPLAY [postgresql-servers] ******************************************************\n\nTASK [setup] *******************************************************************\nok: [192.168.22.172]\nok: [192.168.22.171]\n\nTASK [postgresqldbserver : Install PostgreSQL dependencies] ********************\nok: [192.168.22.171] =&gt; (item=[u'gcc', u'openldap-devel', u'python-devel', u'readline-devel', u'openssl-devel', u'redhat-lsb', u'bison', u'flex', u'perl-ExtUtils-Embed', u'zlib-devel', u'crypto-utils', u'openssl-devel', u'pam-devel', u'libxml2-devel', u'libxslt-devel', u'tcl', u'tcl-devel', u'openssh-clients', u'bzip2', u'net-tools', u'wget', u'screen', u'ksh'])\nok: [192.168.22.172] =&gt; (item=[u'gcc', u'openldap-devel', u'python-devel', u'readline-devel', u'openssl-devel', u'redhat-lsb', u'bison', u'flex', u'perl-ExtUtils-Embed', u'zlib-devel', u'crypto-utils', u'openssl-devel', u'pam-devel', u'libxml2-devel', u'libxslt-devel', u'tcl', u'tcl-devel', u'openssh-clients', u'bzip2', u'net-tools', u'wget', u'screen', u'ksh'])\n\nTASK [postgresqldbserver : Add PostgreSQL operating system group] **************\nok: [192.168.22.172]\nok: [192.168.22.171]\n\nTASK [postgresqldbserver : Add PostgreSQL operating system user] ***************\nok: [192.168.22.172]\nok: [192.168.22.171]\n\nTASK [postgresqldbserver : Download the PostgreSQL 9.5.3 sources] **************\nchanged: [192.168.22.172]\nchanged: [192.168.22.171]\n\nTASK [postgresqldbserver : Copy PostgreSQL install script to targets] **********\nok: [192.168.22.171]\nok: [192.168.22.172]\n\nTASK [postgresqldbserver : Compile and install PostgreSQL] *********************\nchanged: [192.168.22.171]\nchanged: [192.168.22.172]\n\nPLAY RECAP *********************************************************************\n192.168.22.171             : ok=7    changed=2    unreachable=0    failed=0   \n192.168.22.172             : ok=7    changed=2    unreachable=0    failed=0   \n<\/pre>\n<p>&#8230; and we are done. Just to prove it:<\/p>\n<pre class=\"brush: bash; gutter: true; first-line: 1\">\n[root@ansiblepg1 ~] \/u01\/app\/postgres\/product\/95\/db_3\/bin\/psql --version\npsql (PostgreSQL) 9.5.3 dbi services build\n[root@ansiblepg2 ~] \/u01\/app\/postgres\/product\/95\/db_3\/bin\/psql --version\npsql (PostgreSQL) 9.5.3 dbi services build\n<\/pre>\n<p>PostgreSQL is installed and ready to create a new database cluster (which is the topic for the next post).<\/p>\n<p>Btw: The two steps of copying the script to the targets and then execute it can be combined into one step by using the <a href=\"http:\/\/docs.ansible.com\/ansible\/script_module.html\" target=\"_blank\" rel=\"noopener\">script module<\/a>.<br \/>\nBtw2: Of course you might do the same with Oracle, Mysql, MongoDB, Cassandra, &#8230;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In the last post in this series we looked at how you can instruct Ansible to install packages on the operating system using the yum module and how you can create groups and users by using the group and the user modules. In this post we&#8217;ll look at how you can download the PostgreSQL sources,&hellip;&nbsp;<\/p>\n","protected":false},"author":28,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"neve_meta_sidebar":"","neve_meta_container":"","neve_meta_enable_content_width":"","neve_meta_content_width":0,"neve_meta_title_alignment":"","neve_meta_author_avatar":"","neve_post_elements_order":"","neve_meta_disable_header":"","neve_meta_disable_footer":"","neve_meta_disable_title":"","neve_meta_reading_time":"","_themeisle_gutenberg_block_has_review":false,"footnotes":""},"categories":[4133],"tags":[150],"class_list":["post-8629","post","type-post","status-publish","format-standard","hentry","category-database","tag-ansible"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v28.8 (Yoast SEO v28.8) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Getting started with Ansible \u2013 Download the PostgreSQL sources, compile and install - dbi services | Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.dbi-services.com\/blog\/getting-started-with-ansible-download-the-postgresql-sources-compile-and-install\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Getting started with Ansible \u2013 Download the PostgreSQL sources, compile and install\" \/>\n<meta property=\"og:description\" content=\"In the last post in this series we looked at how you can instruct Ansible to install packages on the operating system using the yum module and how you can create groups and users by using the group and the user modules. In this post we&#8217;ll look at how you can download the PostgreSQL sources,&hellip;&nbsp;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.dbi-services.com\/blog\/getting-started-with-ansible-download-the-postgresql-sources-compile-and-install\/\" \/>\n<meta property=\"og:site_name\" content=\"dbi services | Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/dbiservices\/\" \/>\n<meta property=\"article:published_time\" content=\"2016-07-26T02:21:33+00:00\" \/>\n<meta name=\"author\" content=\"Open source Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@dbiservices\" \/>\n<meta name=\"twitter:site\" content=\"@dbiservices\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Open source Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/getting-started-with-ansible-download-the-postgresql-sources-compile-and-install\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/getting-started-with-ansible-download-the-postgresql-sources-compile-and-install\\\/\"},\"author\":{\"name\":\"Open source Team\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#\\\/schema\\\/person\\\/0b4548362cac3eeff8b3eaf329e3530a\"},\"headline\":\"Getting started with Ansible \u2013 Download the PostgreSQL sources, compile and install\",\"datePublished\":\"2016-07-26T02:21:33+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/getting-started-with-ansible-download-the-postgresql-sources-compile-and-install\\\/\"},\"wordCount\":410,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#organization\"},\"keywords\":[\"Ansible\"],\"articleSection\":[\"Database\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/getting-started-with-ansible-download-the-postgresql-sources-compile-and-install\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/getting-started-with-ansible-download-the-postgresql-sources-compile-and-install\\\/\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/getting-started-with-ansible-download-the-postgresql-sources-compile-and-install\\\/\",\"name\":\"Getting started with Ansible \u2013 Download the PostgreSQL sources, compile and install - dbi services | Blog\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#website\"},\"datePublished\":\"2016-07-26T02:21:33+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/getting-started-with-ansible-download-the-postgresql-sources-compile-and-install\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/getting-started-with-ansible-download-the-postgresql-sources-compile-and-install\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/getting-started-with-ansible-download-the-postgresql-sources-compile-and-install\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Accueil\",\"item\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Getting started with Ansible \u2013 Download the PostgreSQL sources, compile and install\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/\",\"name\":\"dbi services Blog\",\"description\":\"#BeSharing\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#organization\"},\"alternateName\":\"dbi Blog\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#organization\",\"name\":\"dbi services\",\"alternateName\":\"dbi\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/09\\\/dbi-services-logo.png\",\"contentUrl\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/2026\\\/09\\\/dbi-services-logo.png\",\"width\":512,\"height\":512,\"caption\":\"dbi services\"},\"image\":{\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/dbiservices\\\/\",\"https:\\\/\\\/x.com\\\/dbiservices\",\"https:\\\/\\\/www.linkedin.com\\\/company\\\/dbi-services\\\/\",\"https:\\\/\\\/www.youtube.com\\\/user\\\/dbiservices\"],\"description\":\"Swiss IT consulting and services company specialised in efficient data infrastructures and platforms: databases, application servers, cloud, DevOps, digitalization, analytics, data quality and monitoring. Headquartered in Del\u00e9mont with offices in Nyon, Basel, Bern and Zurich.\",\"email\":\"info@dbi-services.com\",\"telephone\":\"+41 32 422 96 00\",\"legalName\":\"dbi services SA\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/#\\\/schema\\\/person\\\/0b4548362cac3eeff8b3eaf329e3530a\",\"name\":\"Open source Team\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/05\\\/open-source-author.png\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/05\\\/open-source-author.png\",\"contentUrl\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/05\\\/open-source-author.png\",\"caption\":\"Open source Team\"},\"description\":\"Posts published under the Open source Team account are collective contributions by the dbi services open infrastructure consultants. The practice covers open-source databases and platforms, PostgreSQL first of all, along with MySQL, MariaDB, and Linux, from architecture, replication, and high availability to performance tuning and operations under service level agreements, and contributes actively to the PostgreSQL community.\",\"url\":\"https:\\\/\\\/www.dbi-services.com\\\/blog\\\/author\\\/open-source-team\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Getting started with Ansible \u2013 Download the PostgreSQL sources, compile and install - dbi services | Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.dbi-services.com\/blog\/getting-started-with-ansible-download-the-postgresql-sources-compile-and-install\/","og_locale":"en_US","og_type":"article","og_title":"Getting started with Ansible \u2013 Download the PostgreSQL sources, compile and install","og_description":"In the last post in this series we looked at how you can instruct Ansible to install packages on the operating system using the yum module and how you can create groups and users by using the group and the user modules. In this post we&#8217;ll look at how you can download the PostgreSQL sources,&hellip;&nbsp;","og_url":"https:\/\/www.dbi-services.com\/blog\/getting-started-with-ansible-download-the-postgresql-sources-compile-and-install\/","og_site_name":"dbi services | Blog","article_publisher":"https:\/\/www.facebook.com\/dbiservices\/","article_published_time":"2016-07-26T02:21:33+00:00","author":"Open source Team","twitter_card":"summary_large_image","twitter_creator":"@dbiservices","twitter_site":"@dbiservices","twitter_misc":{"Written by":"Open source Team","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.dbi-services.com\/blog\/getting-started-with-ansible-download-the-postgresql-sources-compile-and-install\/#article","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/getting-started-with-ansible-download-the-postgresql-sources-compile-and-install\/"},"author":{"name":"Open source Team","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/0b4548362cac3eeff8b3eaf329e3530a"},"headline":"Getting started with Ansible \u2013 Download the PostgreSQL sources, compile and install","datePublished":"2016-07-26T02:21:33+00:00","mainEntityOfPage":{"@id":"https:\/\/www.dbi-services.com\/blog\/getting-started-with-ansible-download-the-postgresql-sources-compile-and-install\/"},"wordCount":410,"commentCount":0,"publisher":{"@id":"https:\/\/www.dbi-services.com\/blog\/#organization"},"keywords":["Ansible"],"articleSection":["Database"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.dbi-services.com\/blog\/getting-started-with-ansible-download-the-postgresql-sources-compile-and-install\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.dbi-services.com\/blog\/getting-started-with-ansible-download-the-postgresql-sources-compile-and-install\/","url":"https:\/\/www.dbi-services.com\/blog\/getting-started-with-ansible-download-the-postgresql-sources-compile-and-install\/","name":"Getting started with Ansible \u2013 Download the PostgreSQL sources, compile and install - dbi services | Blog","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/#website"},"datePublished":"2016-07-26T02:21:33+00:00","breadcrumb":{"@id":"https:\/\/www.dbi-services.com\/blog\/getting-started-with-ansible-download-the-postgresql-sources-compile-and-install\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.dbi-services.com\/blog\/getting-started-with-ansible-download-the-postgresql-sources-compile-and-install\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.dbi-services.com\/blog\/getting-started-with-ansible-download-the-postgresql-sources-compile-and-install\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Accueil","item":"https:\/\/www.dbi-services.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Getting started with Ansible \u2013 Download the PostgreSQL sources, compile and install"}]},{"@type":"WebSite","@id":"https:\/\/www.dbi-services.com\/blog\/#website","url":"https:\/\/www.dbi-services.com\/blog\/","name":"dbi services Blog","description":"#BeSharing","publisher":{"@id":"https:\/\/www.dbi-services.com\/blog\/#organization"},"alternateName":"dbi Blog","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.dbi-services.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.dbi-services.com\/blog\/#organization","name":"dbi services","alternateName":"dbi","url":"https:\/\/www.dbi-services.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2026\/09\/dbi-services-logo.png","contentUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2026\/09\/dbi-services-logo.png","width":512,"height":512,"caption":"dbi services"},"image":{"@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/dbiservices\/","https:\/\/x.com\/dbiservices","https:\/\/www.linkedin.com\/company\/dbi-services\/","https:\/\/www.youtube.com\/user\/dbiservices"],"description":"Swiss IT consulting and services company specialised in efficient data infrastructures and platforms: databases, application servers, cloud, DevOps, digitalization, analytics, data quality and monitoring. Headquartered in Del\u00e9mont with offices in Nyon, Basel, Bern and Zurich.","email":"info@dbi-services.com","telephone":"+41 32 422 96 00","legalName":"dbi services SA"},{"@type":"Person","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/0b4548362cac3eeff8b3eaf329e3530a","name":"Open source Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2022\/05\/open-source-author.png","url":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2022\/05\/open-source-author.png","contentUrl":"https:\/\/www.dbi-services.com\/blog\/wp-content\/uploads\/2022\/05\/open-source-author.png","caption":"Open source Team"},"description":"Posts published under the Open source Team account are collective contributions by the dbi services open infrastructure consultants. The practice covers open-source databases and platforms, PostgreSQL first of all, along with MySQL, MariaDB, and Linux, from architecture, replication, and high availability to performance tuning and operations under service level agreements, and contributes actively to the PostgreSQL community.","url":"https:\/\/www.dbi-services.com\/blog\/author\/open-source-team\/"}]}},"_links":{"self":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/8629","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/users\/28"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/comments?post=8629"}],"version-history":[{"count":0,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/8629\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/media?parent=8629"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/categories?post=8629"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/tags?post=8629"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}