At the end of this section, you should have the server initialized with a user
user, disabled login with the
sudo) user (for security reasons) and generally have your server secured.
ansible-private-samplerepo that you cloned as
ansible-privatehas a pre-filled out
hosts.inifile with some boilerplate groups and variables. Most of this you can leave as is, but there are a few things to update that are marked with
TODOs. You should make sure to update the following:
- 1.Set the
- 2.Define your server in
# From the ansible-playbook repo
./scripts/portals-ping.sh -u root --limit eu-ger-1
./scripts/portals-ping.sh -u <root-like-user> --limit eu-ger-1
Now that you know Ansible is working to target your server, it is time to initialize your server to be ready for running a portal. To do this we will need to run the portals-setup-initial.sh Ansible script. Before we run that script, let's make sure we have everything we need.
First, you should have been able to run the portal ping playbook from the previous step successfully.
Second, we want to make sure our ssh keys get added to the server properly when creating the
useraccount on the server. In the
ansible-private/custom-vars/common.ymlfile, set your ssh key in the
webportal_user_authorized_keysvariable, or follow the instructions in the comments for setting multiple keys.
Also in the
ansible-private/custom-vars/common.ymlconfig file there is one email variable that you will want to define.
Initialize your server by running:
# Replace <host> with the host name you defined
# for your server in hosts.ini
./scripts/portals-setup-initial.sh --limit <host>