Comments (6)
Ah, this was my bad. I misunderstood the line in sudoers.
I had:
devops ALL=NOPASSWD: ALL
but needed:
devops ALL=(ALL) NOPASSWD: ALL
to allow the devops user to run any command as any user instead of just as root.
from ansible-role-postgresql.
It's saying your sudo
use requires a password, so you'll need to supply the ansible remote user's sudo password when you run your playbook, e.g. by setting the --ask-become-pass
(-K
for short) flag on the command line. Then when you run the playbook, it will prompt you for your sudo password.
from ansible-role-postgresql.
The confusing part is the user I'm running this as has full sudo with nopasswd and all other tasks before this run with no problems.
from ansible-role-postgresql.
When I try with a sudo password for the remote_user I get the following error:
TASK [geerlingguy.postgresql : Ensure PostgreSQL databases are present.] *******
failed: [dc1-devops-db] (item={u'name': u'bamboo_db'}) => {"failed": true, "item": {"name": "bamboo_db"}, "module_stderr": "Sorry, user devops is not allowed to execute '/bin/sh -c echo BECOME-SUCCESS-ikltotafdcrssvxqdvbfruhgrxbsdgmf; /usr/bin/python' as postgres on dc1-devops-db.domain.com.\n", "module_stdout": "", "msg": "MODULE FAILURE"}
Note, if I SSH to the host as the remote_user and run sudo I am not prompted for a password.
from ansible-role-postgresql.
@jbilbro hmm... you may be running into ansible/ansible#16048
from ansible-role-postgresql.
Great! Closing for now, then.
from ansible-role-postgresql.
Related Issues (20)
- Unable to define global config with version 3.4.0 HOT 15
- Error Initializing Database HOT 4
- Installs version specified by default postgres_version variable on AlmaLinux 8.6 HOT 4
- pg_ident.conf support HOT 3
- Ansible pipeline can't find or access the Ubuntu-20.yml file HOT 1
- Ensure PostgreSQL users are present [Failed] HOT 6
- I am not able to create users and databases HOT 5
- Can't use standard playbook with single user and database
- Is there any build in backup system? HOT 3
- Fedora 37 HOT 5
- postgresql_users roles member predefined HOT 5
- Documentation for priv attribute of postgresql_users parameter HOT 3
- Would support for namimg / multiple instances be accepted? HOT 2
- On Ubuntu 22 default version of postgresql package is 15 HOT 3
- Please consider using Ansible FQCN HOT 2
- Role fails when used with AWX (Ansible Tower) without FQCN HOT 2
- RedHat 9 - wrong version number HOT 2
- postgresql_user priv is deprecated, needs to be migrated to postgresql_privs HOT 3
- Postgresql 11 is EOL since 2023-01-05 HOT 2
- Prerequisite collection 'community.postgresql' now needed? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ansible-role-postgresql.