[GH-ISSUE #467] modoboa-admin.py needs to be silent #453

Closed
opened 2026-02-27 11:11:51 +03:00 by kerem · 12 comments
Owner

Originally created by @tonioo on GitHub (Dec 4, 2013).
Original GitHub issue: https://github.com/modoboa/modoboa/issues/467

Originally assigned to: @tonioo on GitHub.

Originally created by Boris Shomodjvarac on 2013-10-14T07:48:30Z

In order to make the instalation using salt stack, modoboa-admin.py needs to have extra parameters for database configuration

Originally created by @tonioo on GitHub (Dec 4, 2013). Original GitHub issue: https://github.com/modoboa/modoboa/issues/467 Originally assigned to: @tonioo on GitHub. **Originally created by Boris Shomodjvarac on 2013-10-14T07:48:30Z** In order to make the instalation using salt stack, modoboa-admin.py needs to have extra parameters for database configuration
kerem 2026-02-27 11:11:51 +03:00
Author
Owner

@tonioo commented on GitHub (Dec 4, 2013):

Posted by Simon Kern on 2013-10-16T03:04:41Z

I'd suggest we use https://github.com/kennethreitz/dj-database-url for simplicity reasons - making the commandline accept the database-url as a kwarg.

Any objections?

<!-- gh-comment-id:29816773 --> @tonioo commented on GitHub (Dec 4, 2013): **Posted by Simon Kern on 2013-10-16T03:04:41Z** I'd suggest we use https://github.com/kennethreitz/dj-database-url for simplicity reasons - making the commandline accept the database-url as a kwarg. Any objections?
Author
Owner

@tonioo commented on GitHub (Dec 4, 2013):

Posted by Boris Shomodjvarac on 2013-10-16T07:35:09Z

no problem

<!-- gh-comment-id:29816776 --> @tonioo commented on GitHub (Dec 4, 2013): **Posted by Boris Shomodjvarac on 2013-10-16T07:35:09Z** no problem
Author
Owner

@tonioo commented on GitHub (Dec 4, 2013):

Posted by Antoine Nguyen on 2013-10-16T07:52:23Z

Fine with me.

<!-- gh-comment-id:29816778 --> @tonioo commented on GitHub (Dec 4, 2013): **Posted by Antoine Nguyen on 2013-10-16T07:52:23Z** Fine with me.
Author
Owner

@tonioo commented on GitHub (Dec 4, 2013):

Posted by Simon Kern on 2013-10-16T22:48:31Z

done.
I had to fix #490 first, so you should commit this first.

I had to change some other parts of the deploy file as well (e.g. the template), in case you have any questions - let me know.

<!-- gh-comment-id:29816780 --> @tonioo commented on GitHub (Dec 4, 2013): **Posted by Simon Kern on 2013-10-16T22:48:31Z** done. I had to fix #490 first, so you should commit this first. I had to change some other parts of the deploy file as well (e.g. the template), in case you have any questions - let me know.
Author
Owner

@tonioo commented on GitHub (Dec 4, 2013):

Posted by Simon Kern on 2013-10-16T23:05:50Z

This one is better, there was an issue with the template :-p

<!-- gh-comment-id:29816783 --> @tonioo commented on GitHub (Dec 4, 2013): **Posted by Simon Kern on 2013-10-16T23:05:50Z** This one is better, there was an issue with the template :-p
Author
Owner

@tonioo commented on GitHub (Dec 4, 2013):

Posted by Boris Shomodjvarac on 2013-10-17T09:17:26Z

Thx, I will try this over the weekend.

<!-- gh-comment-id:29816786 --> @tonioo commented on GitHub (Dec 4, 2013): **Posted by Boris Shomodjvarac on 2013-10-17T09:17:26Z** Thx, I will try this over the weekend.
Author
Owner

@tonioo commented on GitHub (Dec 4, 2013):

Posted by Antoine Nguyen on 2013-11-02T18:27:33Z

Applied in changeset commit:0029cdc00cd7d92af000194743fc1923da189ad8.

<!-- gh-comment-id:29816788 --> @tonioo commented on GitHub (Dec 4, 2013): **Posted by Antoine Nguyen on 2013-11-02T18:27:33Z** Applied in changeset commit:0029cdc00cd7d92af000194743fc1923da189ad8.
Author
Owner

@schuppo commented on GitHub (Mar 24, 2014):

Is there a way to install the plugins, for example for post fix auto replys, silently too? I am trying to integrate the setup of a modoboa instance into an automatic deployment (I am using Ansible) but it hangs at the asked questions. It is possible to pass the value with bash's HERE documents for example, but the password prompt seems not to accept it. Any workaround?

<!-- gh-comment-id:38457748 --> @schuppo commented on GitHub (Mar 24, 2014): Is there a way to install the plugins, for example for post fix auto replys, silently too? I am trying to integrate the setup of a modoboa instance into an automatic deployment (I am using Ansible) but it hangs at the asked questions. It is possible to pass the value with bash's HERE documents for example, but the password prompt seems not to accept it. Any workaround?
Author
Owner

@tonioo commented on GitHub (Mar 24, 2014):

You mean you would like to deploy a fresh modoboa instance with pre-activated extensions ?

Which questions are you talking about ? Could you give more details ?

<!-- gh-comment-id:38489006 --> @tonioo commented on GitHub (Mar 24, 2014): You mean you would like to deploy a fresh modoboa instance with pre-activated extensions ? Which questions are you talking about ? Could you give more details ?
Author
Owner

@schuppo commented on GitHub (Mar 25, 2014):

Yes, exactly. I would like to deploy a fresh modoboa instance with pre-activated extensions (sorry for my bad english, it is not my first language).
In short: I want a command like this to work without prompts for the purpose of automation:

modoboa-admin.py postfix_maps --dbtype mysql /etc/postfix <<< $'localhost\n[database-name]\n[database-user]\n[database-user-password]'

When I put that command in the shell it responds with

Password: Database host: Database name: Username:

I then can put in the password or interrupt the command. When doing last the stacktrace tells me that python's getpass module had denied the pass. A small research lead me to python's documentation of the getpass module and even though the information given there is beyond my knowledge of command line programming (and beyond my knowledge of python and django, because unfortunately I am neither into python nor into django) it seems to me that the problem arises because of the way the arguments are given. Until now I couldn't finde a workaround.

<!-- gh-comment-id:38584676 --> @schuppo commented on GitHub (Mar 25, 2014): Yes, exactly. I would like to deploy a fresh modoboa instance with pre-activated extensions (sorry for my bad english, it is not my first language). In short: I want a command like this to work without prompts for the purpose of automation: ``` modoboa-admin.py postfix_maps --dbtype mysql /etc/postfix <<< $'localhost\n[database-name]\n[database-user]\n[database-user-password]' ``` When I put that command in the shell it responds with ``` Password: Database host: Database name: Username: ``` I then can put in the password or interrupt the command. When doing last the stacktrace tells me that python's getpass module had denied the pass. A small research lead me to python's documentation of the [getpass module](http://docs.python.org/2/library/getpass.html) and even though the information given there is beyond my knowledge of command line programming (and beyond my knowledge of python and django, because unfortunately I am neither into python nor into django) it seems to me that the problem arises because of the way the arguments are given. Until now I couldn't finde a workaround.
Author
Owner

@tonioo commented on GitHub (Mar 25, 2014):

About the password issue, I could add the same option than the one available for the deploy command (--dburl).

About activating extensions just after a deploy, there is currently no way to achieve it easily. I could add a new option to the deploy command (like --extensions=[list of extensions])

What do you think ?

<!-- gh-comment-id:38588721 --> @tonioo commented on GitHub (Mar 25, 2014): About the password issue, I could add the same option than the one available for the deploy command (--dburl). About activating extensions just after a deploy, there is currently no way to achieve it easily. I could add a new option to the deploy command (like --extensions=[list of extensions]) What do you think ?
Author
Owner

@schuppo commented on GitHub (Mar 27, 2014):

Your first suggestion would be perfectly fine for me. For the purpose of deployment automation it is just important to have the opportunity to hand over arguments as parameters to skip the prompts.

<!-- gh-comment-id:38787361 --> @schuppo commented on GitHub (Mar 27, 2014): Your first suggestion would be perfectly fine for me. For the purpose of deployment automation it is just important to have the opportunity to hand over arguments as parameters to skip the prompts.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/modoboa-modoboa#453
No description provided.