diff --git a/lib/ansible/modules/extras/web_infrastructure/jenkins_job.py b/lib/ansible/modules/extras/web_infrastructure/jenkins_job.py index ee8b1745cb7..af5a28c3e9c 100644 --- a/lib/ansible/modules/extras/web_infrastructure/jenkins_job.py +++ b/lib/ansible/modules/extras/web_infrastructure/jenkins_job.py @@ -235,7 +235,7 @@ class JenkinsJob: def present_job(self): if self.config is None and self.enabled is None: - module.fail_json(msg='one of the following params is required on state=present: config,enabled') + self.module.fail_json(msg='one of the following params is required on state=present: config,enabled') if not self.job_exists(): self.create_job()