This guide deploys nsupdate.info (Dynamic DNS web frontend) with Python, Gunicorn, and Nginx.
- name: Deploy nsupdate.info on Debian family
hosts: nsupdate_info_debian
become: true
vars:
nsui_home: /opt/nsupdate-info
nsui_user: nsupdate
nsui_repo: "https://github.com/nsupdate-info/nsupdate.info.git"
nsui_version: "main"
tasks:
- name: Install dependencies
ansible.builtin.apt:
update_cache: true
name:
- git
- python3
- python3-venv
- python3-pip
- nginx
state: present
- name: Ensure application user exists
ansible.builtin.user:
name: "{{ nsui_user }}"
system: true
shell: /usr/sbin/nologin
create_home: false
- name: Clone nsupdate.info
ansible.builtin.git:
repo: "{{ nsui_repo }}"
dest: "{{ nsui_home }}"
version: "{{ nsui_version }}"
force: false
- name: Create Python virtual environment
ansible.builtin.command: python3 -m venv {{ nsui_home }}/venv
args:
creates: "{{ nsui_home }}/venv/bin/activate"
- name: Install Python requirements
ansible.builtin.pip:
requirements: "{{ nsui_home }}/requirements.txt"
virtualenv: "{{ nsui_home }}/venv"
- name: Enable and start nginx
ansible.builtin.systemd:
name: nginx
enabled: true
state: started
- name: Deploy nsupdate.info on RHEL family
hosts: nsupdate_info_rhel
become: true
vars:
nsui_home: /opt/nsupdate-info
nsui_user: nsupdate
nsui_repo: "https://github.com/nsupdate-info/nsupdate.info.git"
nsui_version: "main"
tasks:
- name: Install dependencies
ansible.builtin.dnf:
name:
- git
- python3
- python3-pip
- python3-virtualenv
- nginx
state: present
- name: Ensure application user exists
ansible.builtin.user:
name: "{{ nsui_user }}"
system: true
shell: /sbin/nologin
create_home: false
- name: Clone nsupdate.info
ansible.builtin.git:
repo: "{{ nsui_repo }}"
dest: "{{ nsui_home }}"
version: "{{ nsui_version }}"
force: false
- name: Create Python virtual environment
ansible.builtin.command: python3 -m venv {{ nsui_home }}/venv
args:
creates: "{{ nsui_home }}/venv/bin/activate"
- name: Install Python requirements
ansible.builtin.pip:
requirements: "{{ nsui_home }}/requirements.txt"
virtualenv: "{{ nsui_home }}/venv"
- name: Enable and start nginx
ansible.builtin.systemd:
name: nginx
enabled: true
state: started
ansible-playbook -i inventory.ini nsupdate-info-install.yml
nsupdate_info_debian.Need help automating dynamic DNS deployments? We provide consulting for nsupdate.info setups, RFC 2136 configurations, and DNS backend integrations. Contact office@linux-server-admin.com or visit our contact page.