Skip to content

Commit

Permalink
No commit message
Browse files Browse the repository at this point in the history
  • Loading branch information
alan.christopher.jenkins@a53b5c6056bc7d7b09e181c23cc2ec8362fa7abe authored and admin committed Jun 2, 2017
1 parent 456f098 commit e6b9003
Showing 1 changed file with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[[https://unix.stackexchange.com/questions/368850/ansible-role-why-do-i-have-to-set-user-email-in-etckeeper/368851]]

etckeeper expects that users set git `user.email`. But it does not document this, or suggest a best way to do it.

In common usage, this expectation is masked. I believe the conditions for it breaking are:

1. user.email is not set in git, AND
2. the system hostname cannot be resolved to an FQDN, AND
3. etckeeper is not run from sudo AND
4. etckeeper is not run from a tty

In this situation, etckeeper requires users to set `user.email` in /root/.gitconfig, or to have set it in /etc/.git/config immediately after `etckeeper init`. As per link, these situations can occur when using Ansible.

IMO, considering how to document this behaviour shows it to be user-unfriendly. Therefore, it would be simplest if etckeeper could fall back to using `$(id -un)`, once `$(tty)` fails.

0 comments on commit e6b9003

Please sign in to comment.