diff options
author | Matt Martz <matt@sivel.net> | 2023-04-12 15:02:47 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-12 15:02:47 -0500 |
commit | f7d2c41fa242bc64b9589406cfbe24da97ff2b03 (patch) | |
tree | 2f4cfd96eaee5f680d482417900c2aaa5f34b06a /lib | |
parent | 7ce3270f7213ff1ae64a46ea9a89350da05577bc (diff) | |
download | ansible-f7d2c41fa242bc64b9589406cfbe24da97ff2b03.tar.gz |
[stable-2.15] --syntax-check is only applicable to ansible-playbook. Fixes #80506 (#80507) (#80509)
(cherry picked from commit f3774ae)
Diffstat (limited to 'lib')
-rw-r--r-- | lib/ansible/cli/arguments/option_helpers.py | 2 | ||||
-rwxr-xr-x | lib/ansible/cli/playbook.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/ansible/cli/arguments/option_helpers.py b/lib/ansible/cli/arguments/option_helpers.py index cb37d57c19..a3efb1e268 100644 --- a/lib/ansible/cli/arguments/option_helpers.py +++ b/lib/ansible/cli/arguments/option_helpers.py @@ -235,8 +235,6 @@ def add_check_options(parser): """Add options for commands which can run with diagnostic information of tasks""" parser.add_argument("-C", "--check", default=False, dest='check', action='store_true', help="don't make any changes; instead, try to predict some of the changes that may occur") - parser.add_argument('--syntax-check', dest='syntax', action='store_true', - help="perform a syntax check on the playbook, but do not execute it") parser.add_argument("-D", "--diff", default=C.DIFF_ALWAYS, dest='diff', action='store_true', help="when changing (small) files and templates, show the differences in those" " files; works great with --check") diff --git a/lib/ansible/cli/playbook.py b/lib/ansible/cli/playbook.py index 7d2dbc02f0..4a75a536a9 100755 --- a/lib/ansible/cli/playbook.py +++ b/lib/ansible/cli/playbook.py @@ -54,6 +54,8 @@ class PlaybookCLI(CLI): opt_help.add_module_options(self.parser) # ansible playbook specific opts + self.parser.add_argument('--syntax-check', dest='syntax', action='store_true', + help="perform a syntax check on the playbook, but do not execute it") self.parser.add_argument('--list-tasks', dest='listtasks', action='store_true', help="list all tasks that would be executed") self.parser.add_argument('--list-tags', dest='listtags', action='store_true', |