193
193
self.register(hook, noop)
194
194
available_tags.append(hook)
199
199
"""Execute the hook followed by the playbook using the hook as tag."""
200
200
super(AnsibleHooks, self).execute(args)
201
201
hook_name = os.path.basename(args[0])
202
203
if hook_name in available_tags:
203
204
charmhelpers.contrib.ansible.apply_playbook(
204
205
self.playbook_path, tags=[hook_name])