Commit 4fcffce9 authored by Jürgen Haas's avatar Jürgen Haas

#86 Revert --no-gui to --gui

parent ba7557c3
Pipeline #6605 passed with stage
in 5 minutes and 7 seconds
......@@ -17,7 +17,7 @@ class MyAnsible:
guiAvailable = False
args = None
extras = None
noGuiGiven = False
guiGiven = False
# noinspection PyUnresolvedReferences
......@@ -47,8 +47,8 @@ class MyAnsible:
self.parser.add_argument('--log-path', default=None,
help='Path to an existing directory where output should be written to')
if self.guiAvailable:
self.parser.add_argument('--no-gui', action='store_true', default=False,
help='Disable GUI')
self.parser.add_argument('--gui', action='store_true', default=False,
help='Enable GUI')
if not os.path.exists(self.script.rootPath + 'inventory/group_vars') and not self.script.ignoresInventory():
self.parser.add_argument('--company', default=os.environ.get('ANSIBLE_COMPANY', None),
......@@ -68,8 +68,8 @@ class MyAnsible:
if self.guiAvailable:
# Remember this setting for possible followers
self.noGuiGiven = self.args.no_gui
if self.guiAvailable and (self.args.no_gui or self.args.debug):
self.guiGiven = self.args.gui
if self.guiAvailable and (not self.args.gui or self.args.debug):
self.guiAvailable = False
if 'playbook' in self.args and 'limit' in self.args:
......@@ -317,8 +317,8 @@ class MyAnsibleThread(threading.Thread):
if self.main.args.log_path:
cmd.append('--log-path=' + self.main.args.log_path)
if self.main.noGuiGiven:
if self.main.guiGiven:
if condition:
process = self._openProcess(cmd, cwd=self.main.script.rootPath, env=env)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment