#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# vim: ai ts=4 sts=4 et sw=4 nu
"""
:Author: Ronan Delacroix
:Copyright: (c) 2018 Ronan Delacroix
"""
import ec2host
import tbx.network


def main():
    ec2host.check_ec2_hostname_tags()  # check if instance is a duplicate or not
    internal_hostname = ec2host.create_public_routes()
    if internal_hostname:
        tbx.network.ensure_hostname(internal_hostname, reboot_if_necessary=True)


if __name__ == '__main__':
    main()
