File tree Expand file tree Collapse file tree 1 file changed +10
-13
lines changed
src/main/groovy/com/rundeck/plugins/ansible/plugin Expand file tree Collapse file tree 1 file changed +10
-13
lines changed Original file line number Diff line number Diff line change @@ -761,21 +761,18 @@ public String getNodesFromInventory(AnsibleRunner.AnsibleRunnerBuilder runnerBui
761
761
AnsibleRunner runner = runnerBuilder .build ();
762
762
763
763
if (this .ansibleInventoryListBuilder == null ) {
764
- if (ansibleBinariesDirectoryPath !=null && !ansibleBinariesDirectoryPath .isEmpty ()){
765
- this .ansibleInventoryListBuilder = AnsibleInventoryList .builder ()
766
- .inventory (inventory )
767
- .ansibleBinariesDirectory (java .nio .file .Path .of (ansibleBinariesDirectoryPath ))
768
- .configFile (configFile )
769
- .debug (debug );
770
- }
771
- else {
772
- this .ansibleInventoryListBuilder = AnsibleInventoryList .builder ()
773
- .inventory (inventory )
774
- .configFile (configFile )
775
- .debug (debug );
776
- }
764
+ Path ansibleBinPath = null ;
765
+ if (ansibleBinariesDirectoryPath != null && !ansibleBinariesDirectoryPath .isEmpty ()) {
766
+ ansibleBinPath = (java .nio .file .Path .of (ansibleBinariesDirectoryPath ));
777
767
}
778
768
769
+ this .ansibleInventoryListBuilder = AnsibleInventoryList .builder ()
770
+ .inventory (inventory )
771
+ .ansibleBinariesDirectory (ansibleBinPath )
772
+ .configFile (configFile )
773
+ .debug (debug );
774
+ }
775
+
779
776
if (runner .getVaultPass () != null ){
780
777
VaultPrompt vaultPrompt = VaultPrompt .builder ()
781
778
.vaultId ("None" )
You can’t perform that action at this time.
0 commit comments