'Registers a new ACME account. Returns True if the account was
created and False if it already existed (e.g. it was not newly
created)
https://tools.ietf.org/html/draft-ietf-acme-acme-02#section-6.3'

def _new_reg(self, contact=[]):

    if (self.uri is not None):
        return True
    new_reg = {'resource': 'new-reg', 'agreement': self.agreement, 'contact': contact}
    (result, info) = self.send_signed_request(self.directory['new-reg'], new_reg)
    if ('location' in info):
        self.uri = info['location']
    if (info['status'] in [200, 201]):
        self.changed = True
        return True
    elif (info['status'] == 409):
        return False
    else:
        self.module.fail_json(msg='Error    registering:    {0}    {1}'.format(info['status'], result))
