mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-24 03:11:24 -07:00
ansible-config: add simple tests (#34900)
* Revert "Fix ansible-config with python3 (#34673)"
This reverts commit 2a9daaa45b
.
* ansible-config: add simple tests
* Fix ansible-config with python3
* ansible-test: don't quote "unusual" characters
This commit is contained in:
parent
93acd7c651
commit
217ff4498c
5 changed files with 19 additions and 6 deletions
|
@ -68,11 +68,11 @@ class ConfigCLI(CLI):
|
|||
super(ConfigCLI, self).run()
|
||||
|
||||
if self.options.config_file:
|
||||
self.config_file = to_bytes(unfrackpath(self.options.config_file, follow=False))
|
||||
self.config_file = unfrackpath(self.options.config_file, follow=False)
|
||||
self.config = ConfigManager(self.config_file)
|
||||
else:
|
||||
self.config = ConfigManager()
|
||||
self.config_file = to_bytes(find_ini_config_file())
|
||||
self.config_file = find_ini_config_file()
|
||||
try:
|
||||
if not os.path.exists(self.config_file):
|
||||
raise AnsibleOptionsError("%s does not exist or is not accessible" % (self.config_file))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue