Thanks Dick,
But i need to install with user xxxx and database xxxx how could i achive
it when im running my below play book im getting below error could pls help
out it below issue
 ---
# tasks file for ansible-postgresql
- name: Add repository
  yum_repository:
    name: epel
    description: EPEL YUM repo
    baseurl:
https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm


#Install the client packages && Optionally install the server packages

- yum:
    name: postgresql10
    state: present

- yum:
    name: postgresql10-server
    state: present

- name: intialize the DB
  command: /usr/pgsql-10/bin/postgresql-10-setup initdb
  ignore_errors: yes

- name: enable service httpd and ensure it is not masked
  systemd:
    name: postgresql-10
    enabled:  yes


- name: Make sure a service is running
  systemd:
    state: started
    name: postgresql-10


- name: Create kong  user and passwd
  postgresql_user:
    name: kong
    password: kong111
    role_attr_flags: CREATEDB,NOSUPERUSER

error is below whihc im getting

[image: image.png]


On Mon, Feb 3, 2020 at 2:42 PM Dick Visser <[email protected]> wrote:

> Hi
>
> This should do it:
>
>
> ---
>
> - name: Playbook to install postgresql database
>   become: true
>   hosts: all
>
>   tasks:
>     - name: Install postgresql database
>       package:
>         name: postgresql
>
> On Mon, 3 Feb 2020 at 09:51, gaddam mahendra <[email protected]>
> wrote:
> >
> > HI Team,
> > could you please post a playbook to install postgresql database
> >
> > thanks
> > mahi
> >
> > --
> > You received this message because you are subscribed to the Google
> Groups "Ansible Project" group.
> > To unsubscribe from this group and stop receiving emails from it, send
> an email to [email protected].
> > To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/2bb56463-e7be-4427-b2ee-d1db00e099b7%40googlegroups.com
> .
>
>
>
> --
> Dick Visser
> Trust & Identity Service Operations Manager
> GÉANT
>
> --
> You received this message because you are subscribed to the Google Groups
> "Ansible Project" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/CAL8fbwPeDjYHNg4tebO0WeWh39JrzcQugsub%3DY5R%2BeeqFZxBpw%40mail.gmail.com
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CABvWte2dMtcpG-EJ8GQg6p770jq60Au-BwaBO0Sr_k5U0ueUFQ%40mail.gmail.com.

Reply via email to