Many thanks for your replies. I'm baffled, I seem to be doing exactly the same as you but can't get postgresql installed correctly. Specifically, it doesn't do the postinstall jobs like moving the default configuration files, creating the postgres user and starting the database service (using the service command in my playbook has no effect).
Am I right in assuming that installing a package via the ansible apt module should do exactly the same things as when I install the package manually on the command line? It certainly seems to be the case for all other packages that I am installing. (Apologies if I'm missing something obvious here...) Thanks again for your help. On Thursday, 21 November 2013 23:54:57 UTC, Michael DeHaan wrote: > > The AWX setup playbooks also install Postgres and support 12.04, you may > wish to read ours: > > http://ansibleworks.com/releases/awx/setup/awx-setup-latest.tar.gz<http://www.google.com/url?q=http%3A%2F%2Fansibleworks.com%2Freleases%2Fawx%2Fsetup%2Fawx-setup-latest.tar.gz&sa=D&sntz=1&usg=AFQjCNETHoAALG3ef0N8M6IL0QnirABUCg> > > > > > On Thu, Nov 21, 2013 at 3:10 PM, Brian Coca <[email protected]<javascript:> > > wrote: > >> I use ubuntu 12.04 and the following 'just works': >> >> - name: Installing PosgreSQL >> apt: name={{item}} state=latest >> with_items: >> - postgresql-{{postgresql_version}} >> - postgresql-contrib-{{postgresql_version}} >> - python-psycopg2 >> >> - name: Make sure its running >> service: name=postgresql state=started enabled=yes >> >> but be careful when installing more than 1 version (it is possible) or if >> you have old config files as postgresql package will 'disable' it's own >> startup, check >> /etc/postgresql/<version>/main/start.conf, must be set to auto, can be >> manual or disabled. >> >> -- >> 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] <javascript:>. >> For more options, visit https://groups.google.com/groups/opt_out. >> > > > > -- > Michael DeHaan <[email protected] <javascript:>> > CTO, AnsibleWorks, Inc. > http://www.ansibleworks.com/<http://www.google.com/url?q=http%3A%2F%2Fwww.ansibleworks.com%2F&sa=D&sntz=1&usg=AFQjCNEn7XMcb-1wMxliSyOhlnyBBlDaQg> > > -- 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]. For more options, visit https://groups.google.com/groups/opt_out.
