debops / debops-tools

Your Debian-based data center in a box
https://debops.org/
GNU General Public License v3.0
1.07k stars 116 forks source link

atd_default_allow in atd role does not use bootstrap__admin_name #162

Open niklashagman opened 8 years ago

niklashagman commented 8 years ago

Having a bunch of machines with different admin account names that does not have python or anything else installed that ansible need. Am running my first bootstrap without a ansible_user set, specifying on command line --user that I know works against just this debian host with --become parameter and --ask-pass.

Am expecting debops bootstrap to use this credentials to setup this host with chosen bootstrap__admin_name, bootstrap__admin_sshkeys and bootstrap__domain in my case. After bootstrap is done I add to hosts file ansible_user={{ bootstrap__admin_name }} and I can use depops.

Problem I have found is that atd_default_allow in atd role is by default using ansible_ssh_user and not bootstrap__admin_name. Meaning wrong username is added to /etc/at.allow.

drybjed commented 8 years ago

This is a common thing in different roles so that the role uses the username of the admin from their workstation. But since it looks like it interferes with the use of different account names, I'll add an admin name variable to the debops.core facts so that other roles can use that instead.

And debops.bootstrap needs to allow for multiple admin accounts for this to work better, as well.