Skip to content

Commit

Permalink
Merge pull request #324 from rundeck-plugins/fix/run-1097-ansible-win…
Browse files Browse the repository at this point in the history
…rm-non-admin-user-exception

RUN-1097: Fix: Ansible plugin using a non-admin user on winrm
  • Loading branch information
L2JE authored Aug 18, 2022
2 parents ca99ed7 + 6f58be8 commit 13234eb
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ public INodeSet getNodes() throws ResourceModelSourceException {
} else {
StringBuilder sb = new StringBuilder();

if (root.has("ansible_distribution")) {
if (root.has("ansible_distribution") && !root.get("ansible_distribution").isJsonNull()) {
sb.append(root.get("ansible_distribution").getAsString()).append(" ");
}
if (root.has("ansible_distribution_version")) {
Expand All @@ -366,7 +366,7 @@ public INodeSet getNodes() throws ResourceModelSourceException {
node.setOsFamily(root.get("ansible_os_family").getAsString());
}

if (root.has("ansible_os_name")) {
if (root.has("ansible_os_name") && !root.get("ansible_os_name").isJsonNull()) {
node.setOsName(root.get("ansible_os_name").getAsString());
}

Expand Down

0 comments on commit 13234eb

Please sign in to comment.