Skip to content

Ansible playbook installing OVH DynHost refresh cron job

Notifications You must be signed in to change notification settings

dsabala/ovh-dynhost-ansible

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

OVH DynHost Ansible playbook

Playbook which automatise installation of cron job, which refresh OVH dynamic DNS service known as DynHost

Prerequisites

  • domain bought on OVH
  • configured DynHost entry in OVH DNS zone
  • configured DynHost login and password access

Example

Content of inventory.yml file

all:
  hosts:
    raspberrypi-gate.local
  vars:
    dynhost_user: dynhostd
    dynhost_host: home.yourdomain.com
    dynhost_login: yourdomain.com-home
    dynhost_password: yourhomenewtorkpassword!123
    dynhost_log_dir: /var/log
    dynhost_cron_period_minutes: 10

Run Ansible

ansible-playbook dynhost.yml -u username -i inventory.yml

Check effects

cat /home/dynhostd/cronjob/update.dynhost.home.yourdomain.com.sh
cat /var/log/dynhostd.home.yourdomain.com.log

Possible improvements of this script

  • handling multiple subdomains gently

Credits

Credits for the yjajkiew, creator of shell script used in this playbook

About

Ansible playbook installing OVH DynHost refresh cron job

Topics

Resources

Stars

Watchers

Forks

Languages