Skip to content

Commit

Permalink
Rework imports for different Ansible versions.
Browse files Browse the repository at this point in the history
Signed-off-by: Nils Philippsen <nils@redhat.com>
  • Loading branch information
nphilipp committed Dec 4, 2019
1 parent 78cc40b commit 1a074d4
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/ansiblereview/inventory.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@

try:
import ansible.parsing.dataloader
from ansible.vars.manager import VariableManager
ANSIBLE = 2
except ImportError:
ANSIBLE = 1
else:
ANSIBLE = 2
try:
from ansible.vars import VariableManager
ANSIBLE = 2
from ansible.vars.manager import VariableManager
except ImportError:
ANSIBLE = 1
from ansible.vars import VariableManager


def no_vars_in_host_file(candidate, options):
Expand Down

0 comments on commit 1a074d4

Please sign in to comment.