/ansible-nas

Ansible role for installing and configuring NAS on linux

Primary LanguageHTML

Ansible NAS

Status GitHub Issues GitHub Pull Requests License


Automated Network Attached Storage Installation + Configuration

📝 Table of Contents

🧐 About

INSTALL AND CONFIGURE NAS on ubuntu using this role

✍️ Getting Started

Using this role should be pretty much the same as any other role, but just to make sure, I will include the following directions for different ways of consuming the role.

Docker

Create a Dockerfile similar to the provided one in this repo.

FROM ubuntu:20.04

RUN apt update && apt install -y ansible
RUN mkdir -p /ansible-plays/

WORKDIR /
COPY ./install_configure_play.yml ./ansible-plays/
COPY ./config-dns-server/ /etc/ansible/roles/config-dns-server/

# Run the play (CAN BE OVERIDDEN)
CMD [ "ansible-playbook", "./ansible-plays/install_configure_play.yml" ]

Build the container image

docker build -t ansible-dev:latest -f Dockerfile .

Run the container using your image


docker run -it -p 53:53/udp -p 53:53/tcp ansible-dev:latest

Manual

Installing manually requires a couple of extra steps than the previous methods of installation. This method is, however, more clear.

First fork the repository and make your customizations to the config-dns-server/vars/ role variables

Copy the role to your master or node /etc/ansible/roles/ and create a playbook

local

---
- hosts: 127.0.0.1
  connection: local
  become: true
  roles:
    - config-dns-server

master

---
- hosts: webservers
  become: true
  roles:
    - config-dns-server

👷‍♂️ Authors