Created
June 27, 2017 12:28
-
-
Save fagnersilva/f2aca396a1682a8973f17226d31f892a to your computer and use it in GitHub Desktop.
playbook_postgres,yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Instalando e configurando o PostgreSQL 9.6 | |
| rpm -Uvh https://yum.postgresql.org/9.6/redhat/rhel-7-x86_64/pgdg-centos96-9.6-3.noarch.rpm | |
| yum install postgresql96-server postgresql96-contrib | |
| /usr/pgsql-9.6/bin/postgresql96-setup initdb | |
| systemctl enable postgresql-9.6.service | |
| systemctl start postgresql-9.6.service | |
| --------------------------------------------------------------------------------------------------------------- | |
| postgres.yml | |
| --- | |
| - hosts: smartinfra | |
| remote_user: root | |
| tasks: | |
| - name: "Instalando o PostgreSQL 9.6" | |
| yum: name={{ item }} state=present | |
| with_items: | |
| - http://yum.postgresql.org/9.6/redhat/rhel-7-x86_64/pgdg-centos96-9.6-3.noarch.rpm | |
| - postgresql96-server | |
| - postgresql96-contrib |
Já tentei com:
ansible-playbook postgres.yml --ask-pass --limit @/etc/ansible/playbooks/postgres.retry
e
ansible-playbook --limit @/etc/ansible/playbooks/postgres.retry postgres.yml --ask-pass
Hi.. m facing same issue. M new to ansible, can you tell me how did you fix this?
I recommend that you join the Ansible community on Telegram. As it has been a long time that you relate this problem, I don't remember at that moment
Just in case anyone tumbles here, have lowered 9.6 to 9.3. It works, the project m working is oldie and the url is no longer into existence.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ansible-playbook postgres.yml --ask-pass
SSH password:
PLAY [smartinfra] ****************************************************************************************************************************************************************************************************************************
TASK [Gathering Facts] ***********************************************************************************************************************************************************************************************************************
ok: [192.168.2.44]
TASK [Instalando o PostgreSQL 9.6] ***********************************************************************************************************************************************************************************************************
failed: [192.168.2.44] (item=[u'http://yum.postgresql.org/9.6/redhat/rhel-7-x86_64/pgdg-centos96-9.6-3.noarch.rpm', u'postgresql96-server', u'postgresql96-contrib']) => {"changed": false, "failed": true, "item": ["http://yum.postgresql.org/9.6/redhat/rhel-7-x86_64/pgdg-centos96-9.6-3.noarch.rpm", "postgresql96-server", "postgresql96-contrib"], "msg": "No package matching 'postgresql96-server' found available, installed or updated", "rc": 126, "results": ["No package matching 'postgresql96-server' found available, installed or updated"]}
to retry, use: --limit @/etc/ansible/playbooks/postgres.retry
PLAY RECAP ***********************************************************************************************************************************************************************************************************************************
192.168.2.44 : ok=1 changed=0 unreachable=0 failed=1