'Config ntp authentication'

def config_ntp_auth(self):

    if (self.state == 'present'):
        if (self.auth_type == 'encrypt'):
            self.config_ntp_auth_keyid()
        else:
            self.config_ntp_auth_keyid_by_cli()
    else:
        if (not self.key_id_exist):
            self.module.fail_json(msg='Error:    The    Authentication-keyid    does    not    exist.')
        self.undo_config_ntp_auth_keyid()
    if self.authentication:
        self.config_ntp_auth_enable()
    self.changed = True
