This guide will walk you through setting up an Ubuntu virtual server on Linode, accessing it, installing Ansible, cloning a repository, and running an Ansible playbook.
Prerequisites
- A Linode account or other Linux web hosting provider
- A registered domain name (optional but recommended)
Steps
1. Create an Ubuntu Virtual Server on Linode
-
Log in to Linode or your web hosting provider:
- Visit Linode.com and log in to your account.
-
Create a New Linux virtual server:
- Click the “Create Linode” button.
- Select Ubuntu as the distribution and choose the version you prefer.
- Choose a plan that suits your needs.
- Select a data center region close to your location for better performance.
- (Optional) Configure additional settings such as backups or VLAN if needed.
-
Assign a Domain Name (Optional):
- If you have a registered domain name, configure DNS settings to point to your Linode server’s IP address.
- Manage DNS settings through your domain name registrar’s website.
-
Complete the Linode Setup:
- Click “Create Linode” to finalize the setup.
- Note the domain name assigned to your Linode.
2. Get Access to the Server
Using SSH
-
Open an SSH Client:
-
On Windows, use PuTTY. On macOS or Linux, use the terminal.
ssh root@your-domain-name-dot-com
-
-
Connect to Your Linode:
- Open PuTTY (Windows) or your terminal (macOS/Linux).
- Enter the IP address of your Linode server.
- Use the default SSH port (22) for the connection.
-
Login:
- Enter the username (
root
or the username you specified during setup). - Enter the password created during the Linode setup process.
Note: For enhanced security, consider setting up SSH keys and disabling password authentication.
- Enter the username (
3. Install Ansible on the Virtual Server
-
Add user account and update the software packages list:
-
Update software packages list:
apt update
-
-
Install Ansible:
- Follow the Ansible Installation Guide for detailed instructions.
- Typically, you can install Ansible with:
apt install ansible
-
Verify Installation:
- Check the installation by running:
ansible --version
- You should see the version information for Ansible.
- Check the installation by running:
4. Clone the Repository
-
Clone the Repository:
- Use the following command to clone the repository:
git clone https://github.com/suomisoft/install_scripts/
- Use the following command to clone the repository:
-
Navigate to the Repository Directory:
- Change to the directory of the cloned repository:
cd install_scripts
- Change to the directory of the cloned repository:
5. Run the Ansible Playbook
-
Execute the Playbook:
- Run the following command to start the Ansible playbook:
ansible-playbook social_web_cloud.yml
- Run the following command to start the Ansible playbook:
-
Follow the Prompts:
- Answer any prompts provided by the playbook to complete the configuration.