Skip to content
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

Merged
merged 13 commits into from
Feb 28, 2017

Conversation

KellerFuchs
Copy link
Member

This is a workaround for hashbang/shell-etc#74

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
@KellerFuchs
Copy link
Member Author

@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
Copy link
Member

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?

Copy link
Member Author

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.

Copy link
Member

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. :)

Copy link
Member Author

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

@KellerFuchs KellerFuchs merged commit 6d1b642 into hashbang:master Feb 28, 2017
@KellerFuchs KellerFuchs deleted the shell-root branch February 28, 2017 06:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants