|
@@ -90,7 +90,7 @@ class Blacklist(object):
|
|
|
|
|
|
def add_module(self):
|
|
|
f = open(self.filename, 'a')
|
|
|
- f.write('blacklist %s' % self.module)
|
|
|
+ f.write('blacklist %s\n' % self.module)
|
|
|
|
|
|
|
|
|
def main():
|
|
@@ -113,11 +113,11 @@ def main():
|
|
|
|
|
|
if blacklist.module_listed():
|
|
|
if args['state'] == 'absent':
|
|
|
- blacklist.add_module()
|
|
|
+ blacklist.remove_module()
|
|
|
args['changed'] = True
|
|
|
else:
|
|
|
if args['state'] == 'present':
|
|
|
- blacklist.remove_module()
|
|
|
+ blacklist.add_module()
|
|
|
args['changed'] = True
|
|
|
|
|
|
module.exit_json(**args)
|