Add a server¶
Ready?¶
You need:
a Debian-or-Alpine server with:
ssh access
either
rootuser orsu/sudoprivilege
Set.¶
Bear in mind that we use:
new_serveras the hostname$NEW_SERVER_IPV4as the host ipv4 public address
Note
As you go on the copy-paste way, replace these occurences with meaningful values for your case.
Go!¶
Generate a key for your host¶
Run:
ssh-keygen -t ed25519 -f ./keys/new_server.key -C "caretaker@new_server" -N ""
Configure SSH client¶
Add a block to your ssh.cfg:
Host new_server
Hostname $NEW_SERVER_IPV4
User caretaker
IdentityFile ./keys/new_server.key
IdentitiesOnly yes
Update ansible inventory¶
You should have:
a group named
clanswithnew_serveras a member
At the simplest, add this to the hosts file:
[clans]
new_server
CONGRATULATIONS
You now have local configuration ready to perform galaxie-clans installation!
Install caretaker user access¶
We have setup local configuration as expected, now we need to override these sweet connection options to match reality of your unprepared server.
Run:
ansible-playbook playbooks/setup_access.yml -e scope=new_server $EXTRA_CONNECTION_OPTIONS
Important
This $EXTRA_CONNECTION_OPTIONS is to be replaced by your specific (and unique) case!
You can pick in these:
-e ansible_ssh_user=your_default_userto set a specific connection user-kto have ansible prompt for SSH password-Kto have ansible prompt for become method password--becometo elevate privileges after connection--become-method=suto rely onsuinstead ofsudofor privilege escalation
Validate access¶
ansible -m ping new_server --become
It should give you a glorious:
new_server | SUCCESS => {
"changed": false,
"ping": "pong"
}