Installing Ansible-NAS on Ubuntu Server Latest

Ansible-NAS is an ansible playbook that automates the setup of a personal network-attached storage (NAS) server on Linux. In this tutorial, we will guide you on how to install Ansible-NAS on Ubuntu Server Latest.

Prerequisites

Step 1: Install Required Packages

Before we start installing Ansible-NAS, we need to install some packages that are required for the playbook to run.

sudo apt update && sudo apt upgrade
sudo apt install git python3-dev python3-pip --yes

Step 2: Clone the Ansible-NAS Repository

Next, we need to clone the Ansible-NAS repository from the Github repository into our computer.

git clone https://github.com/DaveStephens/ansible-nas.git

Step 3: Setup the Configuration File

Ansible-NAS comes with a configuration file that you need to edit before running the playbook. In most cases, you don't need to change anything, except for a few settings.

Navigate to the ansible-nas directory and start editing the nas.yml file.

cd ansible-nas
nano nas.yml

Replace all the placeholders with your own settings.

# NAS Name
nas_name: MyNAS

# Samba Settings
samba_workgroup: WORKGROUP
samba_netbios_name: MyNAS
samba_display_name: MyNAS
samba_server_string: MyNAS File Server
samba_description: MyNAS Samba share

# Users
nas_users:
  - { name: alice, password: "ChangeMe", groups: "users,sudo" }

# Timezone
timezone: "Asia/Tokyo"

# External Drive
external_drive_mountpoint: /mnt/external
external_drive_format: ext4
external_drive_label: MyData
external_drive_size: 0

Save the changes and close the file.

Step 4: Run the Ansible Playbook

We are ready to run the Ansible-NAS playbook. The playbook will install all the necessary software and configure the NAS server based on the settings in the nas.yml file.

ansible-playbook -i inventory nas.yml -b -K

The -i inventory option specifies the inventory file to use. The default inventory file (ansible-nas/inventory) lists the local machine, and you do not have to change it.

The -b option specifies that the playbook should run with elevated privileges, and the -K option prompts you to enter your sudo password.

The playbook will take some time to finish, depending on your internet connection and computer speed. Once the playbook completes successfully, your personal NAS server should be ready to use.

Conclusion

In this tutorial, we showed you how to install Ansible-NAS on Ubuntu Server Latest. We hope you found this tutorial helpful, and if you run into any issues or have any questions, please feel free to ask!

If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!

Alternatively, for the best virtual desktop, try Shells!