aboutsummaryrefslogtreecommitdiff
path: root/action_plugins
diff options
context:
space:
mode:
authorJulien Dessaux2021-03-04 13:38:44 +0100
committerJulien Dessaux2021-03-04 13:38:44 +0100
commit2451b5ced341e37fe004b4f36b040a55a97ce03e (patch)
treedc334ead4e601de6960b8546ab9819185b09dee2 /action_plugins
parentMoved borg action plugin into its own role (diff)
downloadborg-ansible-role-2451b5ced341e37fe004b4f36b040a55a97ce03e.tar.gz
borg-ansible-role-2451b5ced341e37fe004b4f36b040a55a97ce03e.tar.bz2
borg-ansible-role-2451b5ced341e37fe004b4f36b040a55a97ce03e.zip
Fixed stupid ansible python sucks silent name collision
Diffstat (limited to 'action_plugins')
-rw-r--r--action_plugins/borg_init.py (renamed from action_plugins/init.py)8
1 files changed, 5 insertions, 3 deletions
diff --git a/action_plugins/init.py b/action_plugins/borg_init.py
index a37b109..1775271 100644
--- a/action_plugins/init.py
+++ b/action_plugins/borg_init.py
@@ -9,14 +9,16 @@ class ActionModule(ActionBase):
result['changed'] = False
result['failed'] = False
- is_borg_server = False
+ is_server = False
for hostname, hostvars in task_vars['hostvars'].items() :
if 'borg_server' in hostvars.keys() and hostvars['borg_server'] == task_vars['ansible_host']:
- is_borg_server = True
+ is_server = True
result['ansible_facts'] = {
- 'is_borg_server': is_borg_server,
+ 'borg': {
+ 'is_server': is_server,
+ }
}
return result