Skip to content

Commit

Permalink
add configuring ansible group playbook
Browse files Browse the repository at this point in the history
mperov committed May 25, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent a76a47f commit 2c204d3
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion webApp.py
Original file line number Diff line number Diff line change
@@ -29,7 +29,16 @@ def index():
def sendGroups():
if DEBUG:
print(inspect.currentframe().f_code.co_name)
groups = getGroups();
info = request.get_json(force=True)
try:
ig = info['ig']
eg = info['eg']
eu = info['eu']
except:
text = "Incorrect json data filling!"
return jsonify(result=text)

groups = getGroups(excluded = eg, included = ig, excludedUsers = eu);
playbook = getGroupsPlayBook(groups)
writePlayBook(playbook, "groups_playbook.yml")
return send_from_directory(app.root_path, "groups_playbook.yml")

0 comments on commit 2c204d3

Please sign in to comment.