Skip to content

Commit d6635a3

Browse files
committed
removed ANSIBLE_GENERATE_INVENTORY_NODES_AUTH to only use plugin group configuration
1 parent e635344 commit d6635a3

3 files changed

Lines changed: 9 additions & 27 deletions

File tree

src/main/groovy/com/rundeck/plugins/ansible/ansible/AnsibleRunnerContextBuilder.java

Lines changed: 9 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1018,31 +1018,17 @@ public List<String> getListNodesKeyPath(){
10181018

10191019

10201020
public Boolean generateInventoryNodesAuth() {
1021-
Boolean generateInventoryNodesAuth = null;
1022-
String sgenerateInventoryNodesAuth = PropertyResolver.resolveProperty(
1023-
AnsibleDescribable.ANSIBLE_GENERATE_INVENTORY_NODES_AUTH,
1024-
null,
1025-
getFrameworkProject(),
1026-
getFramework(),
1027-
getNode(),
1028-
getJobConf()
1029-
);
1030-
1031-
if (null != sgenerateInventoryNodesAuth) {
1032-
generateInventoryNodesAuth = Boolean.parseBoolean(sgenerateInventoryNodesAuth);
1033-
}
1034-
1035-
// Fallback to plugin group configuration if not set
1036-
if (generateInventoryNodesAuth == null || !generateInventoryNodesAuth) {
1037-
if (this.pluginGroup != null && this.pluginGroup.getGenerateInventoryNodesAuth() != null && this.pluginGroup.getGenerateInventoryNodesAuth()) {
1038-
this.context.getExecutionLogger().log(
1039-
4, "plugin group set getGenerateInventoryNodesAuth: " + this.pluginGroup.getGenerateInventoryNodesAuth()
1040-
);
1041-
generateInventoryNodesAuth = this.pluginGroup.getGenerateInventoryNodesAuth();
1042-
}
1021+
// Only use plugin group configuration
1022+
if (this.pluginGroup != null && this.pluginGroup.getGenerateInventoryNodesAuth() != null) {
1023+
Boolean generateInventoryNodesAuth = this.pluginGroup.getGenerateInventoryNodesAuth();
1024+
this.context.getExecutionLogger().log(
1025+
4, "Using plugin group configuration for generateInventoryNodesAuth: " + generateInventoryNodesAuth
1026+
);
1027+
return generateInventoryNodesAuth;
10431028
}
10441029

1045-
return generateInventoryNodesAuth;
1030+
// Default to false if not configured
1031+
return false;
10461032
}
10471033

10481034
/**

src/main/groovy/com/rundeck/plugins/ansible/plugin/AnsiblePlaybookInlineWorkflowStep.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,6 @@ public class AnsiblePlaybookInlineWorkflowStep implements StepPlugin, AnsibleDes
7070
// Project and framework level mappings for inventory generation
7171
builder.mapping(ANSIBLE_GENERATE_INVENTORY, PROJ_PROP_PREFIX + ANSIBLE_GENERATE_INVENTORY);
7272
builder.frameworkMapping(ANSIBLE_GENERATE_INVENTORY, FWK_PROP_PREFIX + ANSIBLE_GENERATE_INVENTORY);
73-
builder.mapping(ANSIBLE_GENERATE_INVENTORY_NODES_AUTH, PROJ_PROP_PREFIX + ANSIBLE_GENERATE_INVENTORY_NODES_AUTH);
74-
builder.frameworkMapping(ANSIBLE_GENERATE_INVENTORY_NODES_AUTH, FWK_PROP_PREFIX + ANSIBLE_GENERATE_INVENTORY_NODES_AUTH);
7573

7674
DESC = builder.build();
7775
}

src/main/groovy/com/rundeck/plugins/ansible/plugin/AnsiblePlaybookWorkflowStep.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,6 @@ public class AnsiblePlaybookWorkflowStep implements StepPlugin, AnsibleDescribab
6868
// Project and framework level mappings for inventory generation
6969
builder.mapping(ANSIBLE_GENERATE_INVENTORY, PROJ_PROP_PREFIX + ANSIBLE_GENERATE_INVENTORY);
7070
builder.frameworkMapping(ANSIBLE_GENERATE_INVENTORY, FWK_PROP_PREFIX + ANSIBLE_GENERATE_INVENTORY);
71-
builder.mapping(ANSIBLE_GENERATE_INVENTORY_NODES_AUTH, PROJ_PROP_PREFIX + ANSIBLE_GENERATE_INVENTORY_NODES_AUTH);
72-
builder.frameworkMapping(ANSIBLE_GENERATE_INVENTORY_NODES_AUTH, FWK_PROP_PREFIX + ANSIBLE_GENERATE_INVENTORY_NODES_AUTH);
7371

7472
DESC = builder.build();
7573
}

0 commit comments

Comments
 (0)