{"id":8600,"date":"2016-07-25T13:13:44","date_gmt":"2016-07-25T11:13:44","guid":{"rendered":"https:\/\/www.dbi-services.com\/blog\/getting-started-with-ansible-installing-os-packages-creating-groups-and-users\/"},"modified":"2016-07-25T13:13:44","modified_gmt":"2016-07-25T11:13:44","slug":"getting-started-with-ansible-installing-os-packages-creating-groups-and-users","status":"publish","type":"post","link":"https:\/\/www.dbi-services.com\/blog\/getting-started-with-ansible-installing-os-packages-creating-groups-and-users\/","title":{"rendered":"Getting started with Ansible &#8211; Installing OS packages, creating groups and users"},"content":{"rendered":"<p>It has been quite a while since the first post in this series: &#8220;<a href=\"http:\/\/dbi-services.com\/blog\/getting-started-with-ansible-preparations\/\" target=\"_blank\" rel=\"noopener\">Getting started with Ansible &#8211; Preparations<\/a>&#8220;. If you recap from the initial post Ansible was running on the control host and this simple Ansible command:<\/p>\n<pre class=\"brush: sql; gutter: true; first-line: 1\">\nansible postgres-servers -a \"\/bin\/echo 11\" -f 5\n<\/pre>\n<p>&#8230; was successfully executed against the &#8220;postgres-servers&#8221; group. So far, so good. Getting Ansible up and running for just this would not be very usefull, so lets see where we might go from here.<br \/>\n<!--more--><\/p>\n<p>When you start to think on what you want to automate you should start to think on how you want to organize your Ansible stuff. The documentation provides some <a href=\"http:\/\/docs.ansible.com\/ansible\/playbooks_best_practices.html#directory-layout\" target=\"_blank\" rel=\"noopener\">guidelines<\/a> which might or might not fit your needs. For the scope of this series lets stick to what the documentation is recommeding as one possible way to go. The directory layout on the control host will then be:<\/p>\n<pre class=\"brush: sql; gutter: true; first-line: 1\">\n[ansible@ansiblecontrol ~]$ sudo mkdir \/opt\/ansible\n[ansible@ansiblecontrol ~]$ sudo chown ansible:ansible \/opt\/ansible\n[ansible@ansiblecontrol ~]$ touch \/opt\/ansible\/development                  # the inventory file for the development hosts      \n[ansible@ansiblecontrol ~]$ touch \/opt\/ansible\/staging                      # the inventory file for the staging hosts\n[ansible@ansiblecontrol ~]$ touch \/opt\/ansible\/production                   # the inventory file for the production hosts\n[ansible@ansiblecontrol ~]$ mkdir \/opt\/ansible\/roles\/\n[ansible@ansiblecontrol ~]$ mkdir \/opt\/ansible\/roles\/common                 # a role valid for \"common\" stuff\n[ansible@ansiblecontrol ~]$ mkdir \/opt\/ansible\/roles\/common\/tasks\n[ansible@ansiblecontrol ~]$ mkdir \/opt\/ansible\/roles\/common\/handlers\n[ansible@ansiblecontrol ~]$ mkdir \/opt\/ansible\/roles\/common\/templates\n[ansible@ansiblecontrol ~]$ mkdir \/opt\/ansible\/roles\/common\/files\n[ansible@ansiblecontrol ~]$ mkdir \/opt\/ansible\/roles\/common\/vars\n[ansible@ansiblecontrol ~]$ mkdir \/opt\/ansible\/roles\/common\/meta\n[ansible@ansiblecontrol ~]$ mkdir \/opt\/ansible\/roles\/postgresqldbserver    # a role vaild for the PostgreSQL stuff\n[ansible@ansiblecontrol ~]$ mkdir \/opt\/ansible\/roles\/postgresqldbserver\/tasks\n[ansible@ansiblecontrol ~]$ mkdir \/opt\/ansible\/roles\/postgresqldbserver\/handlers\n[ansible@ansiblecontrol ~]$ mkdir \/opt\/ansible\/roles\/postgresqldbserver\/templates\n[ansible@ansiblecontrol ~]$ mkdir \/opt\/ansible\/roles\/postgresqldbserver\/files\n[ansible@ansiblecontrol ~]$ mkdir \/opt\/ansible\/roles\/postgresqldbserver\/vars\n[ansible@ansiblecontrol ~]$ mkdir \/opt\/ansible\/roles\/postgresqldbserver\/meta\n<\/pre>\n<p>The <a href=\"http:\/\/docs.ansible.com\/ansible\/playbooks_roles.html\" target=\"_blank\" rel=\"noopener\">concept of roles<\/a> is explained in the documentation and you should definitely read that. We&#8217;ll come back to this later.<\/p>\n<p>For now let&#8217;s place our two PostgreSQL hosts into the &#8220;development&#8221; inventory:<\/p>\n<pre class=\"brush: sql; gutter: true; first-line: 1\">\n[ansible@ansiblecontrol ~]$ echo \"[postgresql-servers]\" &gt;&gt; \/opt\/ansible\/development\n[ansible@ansiblecontrol ~]$ echo \"192.168.22.171\" &gt;&gt; \/opt\/ansible\/development\n[ansible@ansiblecontrol ~]$ echo \"192.168.22.172\" &gt;&gt; \/opt\/ansible\/development\n<\/pre>\n<p>Passing our new inventory file to Ansible we should be able to perform the same simple task as in the first post:<\/p>\n<pre class=\"brush: sql; gutter: true; first-line: 1\">\n[ansible@ansiblecontrol ~]$ ansible -i \/opt\/ansible\/development postgresql-servers -a \"\/bin\/echo 11\"\n192.168.22.172 | SUCCESS | rc=0 &gt;&gt;\n11\n\n192.168.22.171 | SUCCESS | rc=0 &gt;&gt;\n11\n<\/pre>\n<p>Ok, fine, this still works. When it comes to PostgreSQL one of the first steps when we want to install from source is to install all the operating system packages which are required. How could we do that with Ansible? <\/p>\n<p>The initial step is to tell Ansible where to look for our roles. This is done by specifying the &#8220;roles_path&#8221; configuration parameter in the ansible.cfg configuration file: <\/p>\n<pre class=\"brush: bash; gutter: true; first-line: 1\">\n[ansible@ansiblecontrol ~]$ cat \/etc\/ansible\/ansible.cfg | grep roles | grep -v \"#\"\nroles_path    = \/opt\/ansible\/roles\n<\/pre>\n<p>From here on we need to setup our role by creating an initial &#8220;site.yml&#8221; file:<\/p>\n<pre class=\"brush: bash; gutter: true; first-line: 1\">\n[ansible@ansiblecontrol ansible]$ cat roles\/postgresqldbserver\/site.yml \n---\n# This playbook deploys a single PostgreSQL instance from the source code\n\n- hosts: postgresql-servers\n  become: true\n  become_user: root\n\n  roles:\n    - postgresqldbserver\n\n<\/pre>\n<p>You can see from the above that the &#8220;postgresql-servers&#8221; group is referenced. Additionally notice the &#8220;become&#8221; and the &#8220;become_user&#8221; flags. As we&#8217;re going to use yum to install the packages we need a way to become root on the target system and this is how you can instruct Ansible to do so.<br \/>\nTime to specify on how we want to install the packages. This is quite easy as well:<\/p>\n<pre class=\"brush: bash; gutter: true; first-line: 1\">\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<\/pre>\n<p>What did we do here? We created our first task. We tell Ansible to use &#8220;yum&#8221; to install our &#8220;items&#8221; (which are the packages we want to install). You can check the documentation for more information on the <a href=\"http:\/\/docs.ansible.com\/ansible\/yum_module.html\" target=\"_blank\" rel=\"noopener\">yum module<\/a>.<\/p>\n<p>Lets see if it works and we can execute our first task on both PostgreSQL nodes:<\/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.171]\nok: [192.168.22.172]\n\nTASK [postgresqldbserver : Install PostgreSQL dependencies] ********************\nchanged: [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'])\nchanged: [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'])\n\nPLAY RECAP *********************************************************************\n192.168.22.171             : ok=2    changed=1    unreachable=0    failed=0   \n192.168.22.172             : ok=2    changed=1    unreachable=0    failed=0   \n<\/pre>\n<p>Cool, we just installed all the dependencies on both nodes with one Ansible command. We additionally want an operating system group for our PostgreSQL deployment so we add the following lines to the <a href=\"http:\/\/docs.ansible.com\/ansible\/playbooks.html\" target=\"_blank\" rel=\"noopener\">playbook<\/a>:<\/p>\n<pre class=\"brush: bash; gutter: true; first-line: 1\">\n- name: Add PostgreSQL operating system group\n  group: name=postgressomegroup state=present\n<\/pre>\n<p>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.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'])\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'])\n\nTASK [postgresqldbserver : Add PostgreSQL operating system group] **************\nchanged: [192.168.22.171]\nchanged: [192.168.22.172]\n\nPLAY RECAP *********************************************************************\n192.168.22.171             : ok=3    changed=1    unreachable=0    failed=0   \n192.168.22.172             : ok=3    changed=1    unreachable=0    failed=0   \n<\/pre>\n<p>We did not change any of the packages but added the group. Lets add the PostgreSQL operating system user by adding these lines to the playbook:<\/p>\n<pre class=\"brush: bash; gutter: true; first-line: 1\">\n- name: Add PostgreSQL operating system user\n  user: name=postgres comment=\"PostgreSQL binaries owner\" group=postgres\n<\/pre>\n<p>Execute 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] **************\nchanged: [192.168.22.171]\nchanged: [192.168.22.172]\n\nTASK [postgresqldbserver : Add PostgreSQL operating system user] ***************\nchanged: [192.168.22.171]\nchanged: [192.168.22.172]\n\nPLAY RECAP *********************************************************************\n192.168.22.171             : ok=4    changed=2    unreachable=0    failed=0   \n192.168.22.172             : ok=4    changed=2    unreachable=0    failed=0   \n<\/pre>\n<p>Really cool and simple. Just to prove lets connect to one of the nodes and check if the postgres user really is there:<\/p>\n<pre class=\"brush: bash; gutter: true; first-line: 1\">\n[root@ansiblepg2 ~] id -a postgres\nuid=1001(postgres) gid=1001(postgres) groups=1001(postgres)\n[root@ansiblepg2 ~] \n<\/pre>\n<p>Perfect. In the next post we&#8217;ll install the PostgreSQL binaries.<\/p>\n<p>For you reference this is the playbook as it looks now:<\/p>\n<pre class=\"brush: bash; gutter: true; first-line: 1\">\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","protected":false},"excerpt":{"rendered":"<p>It has been quite a while since the first post in this series: &#8220;Getting started with Ansible &#8211; Preparations&#8220;. If you recap from the initial post Ansible was running on the control host and this simple Ansible command: ansible postgres-servers -a &#8220;\/bin\/echo 11&#8243; -f 5 &#8230; was successfully executed against the &#8220;postgres-servers&#8221; group. So far, [&hellip;]<\/p>\n","protected":false},"author":29,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[229],"tags":[150,77],"type_dbi":[],"class_list":["post-8600","post","type-post","status-publish","format-standard","hentry","category-database-administration-monitoring","tag-ansible","tag-postgresql"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.2 (Yoast SEO v27.2) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Getting started with Ansible - Installing OS packages, creating groups and users - dbi 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-installing-os-packages-creating-groups-and-users\/\" \/>\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 - Installing OS packages, creating groups and users\" \/>\n<meta property=\"og:description\" content=\"It has been quite a while since the first post in this series: &#8220;Getting started with Ansible &#8211; Preparations&#8220;. If you recap from the initial post Ansible was running on the control host and this simple Ansible command: ansible postgres-servers -a &quot;\/bin\/echo 11&quot; -f 5 &#8230; was successfully executed against the &#8220;postgres-servers&#8221; group. So far, [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.dbi-services.com\/blog\/getting-started-with-ansible-installing-os-packages-creating-groups-and-users\/\" \/>\n<meta property=\"og:site_name\" content=\"dbi Blog\" \/>\n<meta property=\"article:published_time\" content=\"2016-07-25T11:13:44+00:00\" \/>\n<meta name=\"author\" content=\"Daniel Westermann\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@westermanndanie\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Daniel Westermann\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 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-installing-os-packages-creating-groups-and-users\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/getting-started-with-ansible-installing-os-packages-creating-groups-and-users\/\"},\"author\":{\"name\":\"Daniel Westermann\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/8d08e9bd996a89bd75c0286cbabf3c66\"},\"headline\":\"Getting started with Ansible &#8211; Installing OS packages, creating groups and users\",\"datePublished\":\"2016-07-25T11:13:44+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/getting-started-with-ansible-installing-os-packages-creating-groups-and-users\/\"},\"wordCount\":531,\"commentCount\":0,\"keywords\":[\"Ansible\",\"PostgreSQL\"],\"articleSection\":[\"Database Administration &amp; Monitoring\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.dbi-services.com\/blog\/getting-started-with-ansible-installing-os-packages-creating-groups-and-users\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/getting-started-with-ansible-installing-os-packages-creating-groups-and-users\/\",\"url\":\"https:\/\/www.dbi-services.com\/blog\/getting-started-with-ansible-installing-os-packages-creating-groups-and-users\/\",\"name\":\"Getting started with Ansible - Installing OS packages, creating groups and users - dbi Blog\",\"isPartOf\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#website\"},\"datePublished\":\"2016-07-25T11:13:44+00:00\",\"author\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/8d08e9bd996a89bd75c0286cbabf3c66\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/getting-started-with-ansible-installing-os-packages-creating-groups-and-users\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.dbi-services.com\/blog\/getting-started-with-ansible-installing-os-packages-creating-groups-and-users\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/getting-started-with-ansible-installing-os-packages-creating-groups-and-users\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Accueil\",\"item\":\"https:\/\/www.dbi-services.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Getting started with Ansible &#8211; Installing OS packages, creating groups and users\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#website\",\"url\":\"https:\/\/www.dbi-services.com\/blog\/\",\"name\":\"dbi Blog\",\"description\":\"\",\"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\":\"Person\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/8d08e9bd996a89bd75c0286cbabf3c66\",\"name\":\"Daniel Westermann\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/secure.gravatar.com\/avatar\/31350ceeecb1dd8986339a29bf040d4cd3cd087d410deccd8f55234466d6c317?s=96&d=mm&r=g\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/31350ceeecb1dd8986339a29bf040d4cd3cd087d410deccd8f55234466d6c317?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/31350ceeecb1dd8986339a29bf040d4cd3cd087d410deccd8f55234466d6c317?s=96&d=mm&r=g\",\"caption\":\"Daniel Westermann\"},\"description\":\"Daniel Westermann is Principal Consultant and Technology Leader Open Infrastructure at dbi services. He has more than 15 years of experience in management, engineering and optimization of databases and infrastructures, especially on Oracle and PostgreSQL. Since the beginning of his career, he has specialized in Oracle Technologies and is Oracle Certified Professional 12c and Oracle Certified Expert RAC\/GridInfra. Over time, Daniel has become increasingly interested in open source technologies, becoming \u201cTechnology Leader Open Infrastructure\u201d and PostgreSQL expert. \u00a0Based on community or EnterpriseDB tools, he develops and installs complex high available solutions with PostgreSQL. He is also a certified PostgreSQL Plus 9.0 Professional and a Postgres Advanced Server 9.4 Professional. He is a regular speaker at PostgreSQL conferences in Switzerland and Europe. Today Daniel is also supporting our customers on AWS services such as AWS RDS, database migrations into the cloud, EC2 and automated infrastructure management with AWS SSM (System Manager). He is a certified AWS Solutions Architect Professional. Prior to dbi services, Daniel was Management System Engineer at LC SYSTEMS-Engineering AG in Basel. Before that, he worked as Oracle Developper &amp;\u00a0Project Manager at Delta Energy Solutions AG in Basel (today Powel AG). Daniel holds a diploma in Business Informatics (DHBW, Germany). His branch-related experience mainly covers the pharma industry, the financial sector, energy, lottery and telecommunications.\",\"sameAs\":[\"https:\/\/x.com\/westermanndanie\"],\"url\":\"https:\/\/www.dbi-services.com\/blog\/author\/daniel-westermann\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Getting started with Ansible - Installing OS packages, creating groups and users - dbi 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-installing-os-packages-creating-groups-and-users\/","og_locale":"en_US","og_type":"article","og_title":"Getting started with Ansible - Installing OS packages, creating groups and users","og_description":"It has been quite a while since the first post in this series: &#8220;Getting started with Ansible &#8211; Preparations&#8220;. If you recap from the initial post Ansible was running on the control host and this simple Ansible command: ansible postgres-servers -a \"\/bin\/echo 11\" -f 5 &#8230; was successfully executed against the &#8220;postgres-servers&#8221; group. So far, [&hellip;]","og_url":"https:\/\/www.dbi-services.com\/blog\/getting-started-with-ansible-installing-os-packages-creating-groups-and-users\/","og_site_name":"dbi Blog","article_published_time":"2016-07-25T11:13:44+00:00","author":"Daniel Westermann","twitter_card":"summary_large_image","twitter_creator":"@westermanndanie","twitter_misc":{"Written by":"Daniel Westermann","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.dbi-services.com\/blog\/getting-started-with-ansible-installing-os-packages-creating-groups-and-users\/#article","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/getting-started-with-ansible-installing-os-packages-creating-groups-and-users\/"},"author":{"name":"Daniel Westermann","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/8d08e9bd996a89bd75c0286cbabf3c66"},"headline":"Getting started with Ansible &#8211; Installing OS packages, creating groups and users","datePublished":"2016-07-25T11:13:44+00:00","mainEntityOfPage":{"@id":"https:\/\/www.dbi-services.com\/blog\/getting-started-with-ansible-installing-os-packages-creating-groups-and-users\/"},"wordCount":531,"commentCount":0,"keywords":["Ansible","PostgreSQL"],"articleSection":["Database Administration &amp; Monitoring"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.dbi-services.com\/blog\/getting-started-with-ansible-installing-os-packages-creating-groups-and-users\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.dbi-services.com\/blog\/getting-started-with-ansible-installing-os-packages-creating-groups-and-users\/","url":"https:\/\/www.dbi-services.com\/blog\/getting-started-with-ansible-installing-os-packages-creating-groups-and-users\/","name":"Getting started with Ansible - Installing OS packages, creating groups and users - dbi Blog","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/#website"},"datePublished":"2016-07-25T11:13:44+00:00","author":{"@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/8d08e9bd996a89bd75c0286cbabf3c66"},"breadcrumb":{"@id":"https:\/\/www.dbi-services.com\/blog\/getting-started-with-ansible-installing-os-packages-creating-groups-and-users\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.dbi-services.com\/blog\/getting-started-with-ansible-installing-os-packages-creating-groups-and-users\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.dbi-services.com\/blog\/getting-started-with-ansible-installing-os-packages-creating-groups-and-users\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Accueil","item":"https:\/\/www.dbi-services.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Getting started with Ansible &#8211; Installing OS packages, creating groups and users"}]},{"@type":"WebSite","@id":"https:\/\/www.dbi-services.com\/blog\/#website","url":"https:\/\/www.dbi-services.com\/blog\/","name":"dbi Blog","description":"","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":"Person","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/8d08e9bd996a89bd75c0286cbabf3c66","name":"Daniel Westermann","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/31350ceeecb1dd8986339a29bf040d4cd3cd087d410deccd8f55234466d6c317?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/31350ceeecb1dd8986339a29bf040d4cd3cd087d410deccd8f55234466d6c317?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/31350ceeecb1dd8986339a29bf040d4cd3cd087d410deccd8f55234466d6c317?s=96&d=mm&r=g","caption":"Daniel Westermann"},"description":"Daniel Westermann is Principal Consultant and Technology Leader Open Infrastructure at dbi services. He has more than 15 years of experience in management, engineering and optimization of databases and infrastructures, especially on Oracle and PostgreSQL. Since the beginning of his career, he has specialized in Oracle Technologies and is Oracle Certified Professional 12c and Oracle Certified Expert RAC\/GridInfra. Over time, Daniel has become increasingly interested in open source technologies, becoming \u201cTechnology Leader Open Infrastructure\u201d and PostgreSQL expert. \u00a0Based on community or EnterpriseDB tools, he develops and installs complex high available solutions with PostgreSQL. He is also a certified PostgreSQL Plus 9.0 Professional and a Postgres Advanced Server 9.4 Professional. He is a regular speaker at PostgreSQL conferences in Switzerland and Europe. Today Daniel is also supporting our customers on AWS services such as AWS RDS, database migrations into the cloud, EC2 and automated infrastructure management with AWS SSM (System Manager). He is a certified AWS Solutions Architect Professional. Prior to dbi services, Daniel was Management System Engineer at LC SYSTEMS-Engineering AG in Basel. Before that, he worked as Oracle Developper &amp;\u00a0Project Manager at Delta Energy Solutions AG in Basel (today Powel AG). Daniel holds a diploma in Business Informatics (DHBW, Germany). His branch-related experience mainly covers the pharma industry, the financial sector, energy, lottery and telecommunications.","sameAs":["https:\/\/x.com\/westermanndanie"],"url":"https:\/\/www.dbi-services.com\/blog\/author\/daniel-westermann\/"}]}},"_links":{"self":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/8600","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\/29"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/comments?post=8600"}],"version-history":[{"count":0,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/8600\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/media?parent=8600"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/categories?post=8600"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/tags?post=8600"},{"taxonomy":"type","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/type_dbi?post=8600"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}