'Handles state == \'present\', creating or updating the secret'

def present(self):

    secret = self.get_secret()
    if secret:
        self.results['secret_id'] = secret['ID']
        data_changed = False
        attrs = secret.get('Spec', {})
        if attrs.get('Labels', {}).get('ansible_key'):
            if (attrs['Labels']['ansible_key'] != self.data_key):
                data_changed = True
        labels_changed = False
        if (self.labels and attrs.get('Labels')):
            for label in attrs['Labels']:
                if (self.labels.get(label) and (self.labels[label] != attrs['Labels'][label])):
                    labels_changed = True
        labels_added = False
        if self.labels:
            if attrs.get('Labels'):
                for label in self.labels:
                    if (label not in attrs['Labels']):
                        labels_added = True
            else:
                labels_added = True
        if (data_changed or labels_added or labels_changed or self.force):
            self.absent()
            secret_id = self.create_secret()
            self.results['changed'] = True
            self.results['secret_id'] = secret_id
    else:
        self.results['changed'] = True
        self.results['secret_id'] = self.create_secret()
