-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ansible: SSH into shell servers as root #44
Conversation
It seems the documentation was too hard to follow in the first place...
Those files are created by Ansible when a playbook fails, to allow re-running it only on the faulty machines.
In this playbook, we only care about the order of actions on each individual server: it's safe to let servers run through the playbook without waiting on other servers. This leaves synchronisation between the two plays (pulling in changes from git and applying `apt` changes) which is unnecessary. On the other hand, there is very little cost to it anyhow, as most of the execution time is spent on the `apt` play.
Same as for `shell.yml`: we only care about ordering on individual ircds
Using `sudo`, through the Ansible feature `become`, is problematic due to hashbang/shell-etc#74 : sudo does not let Ansible escape the namespace-based sandbox. Since all admins have SSH keys deployed for `root`, this is a good alternative.
Those aren't needed anymore, as Ansible SSHes in as root anyhow.
Reviewed-by: daurnimator
@hashbang/administrators Review needed. |
Reviewed-by: daurnimator
Reviewed-by: daurnimator, dgrove, Ryan
Reviewed-by: dgrove
@@ -4,6 +4,10 @@ ny1.hashbang.sh | |||
sf1.hashbang.sh | |||
to1.hashbang.sh | |||
|
|||
[shell_servers] | |||
ansible_user=root |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add a link to issue 74 in a comment here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Arg. Will do... in a separate PR? :V
In general, though, there is no benefit not to do this: direct root isn't any more privileged than admin+sudo, and this avoids the dependency on LDAP/userdb.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In general I like to disable root login via sshd. I'd like to do that for hashbang too but... this. :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Eeeh, experience (#! and otherwise) says that having a method of getting root without relying on LDAP is good :3
This is a workaround for hashbang/shell-etc#74