Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adapt to python changes #27

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion library/load_user_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ def convert_chef_user_data_bag(self, data):
new_data.update({ansible_key: data_bag_item_value})

if self.extract_extra_keys:
for key, value in data.iteritems():
for key, value in data.items():
new_data.update({key: value})
# Check for an action
chef_action = new_data.get("state", False)
Expand Down
5 changes: 3 additions & 2 deletions library/usersdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ def expand_users(self):
:return:
"""

for username, user_options in self.users_db.iteritems():
for username, user_options in self.users_db.items():

# Check if usermanage_selected_users is set, and exclude users
if self.selected_users:
Expand All @@ -215,7 +215,8 @@ def expand_users(self):
# 1- Check for extra keys that dont translate to ansible user module
if self.extract_extra_keys:
extra_user_data = None
for dic_key in user_options.keys():
user_options_keys = list(user_options.keys())
for dic_key in user_options_keys:
if dic_key not in USERVALUES:
# Add user and state
if not extra_user_data:
Expand Down