Skip to content

Commit

Permalink
Merge pull request #112 from SquirrelCorporation/bug-fix-install-agen…
Browse files Browse the repository at this point in the history
…t-quick-ref

[FIX] Refactor extra variable handling and command reference
  • Loading branch information
SquirrelDeveloper authored Jul 16, 2024
2 parents 16597ae + 52b916a commit 119b00d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 deletions.
2 changes: 1 addition & 1 deletion client/src/pages/Admin/Inventory/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ const Inventory: React.FC = () => {
setTerminal({
target: [target],
isOpen: true,
command: '_installAgent',
quickRef: 'installAgent',
});
};
const onDeleteNewDevice = async () => {
Expand Down
17 changes: 10 additions & 7 deletions server/src/modules/ansible/utils/ExtraVars.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,17 @@ async function findValueOfExtraVars(
logger.error(
`[INTEGRATION][ANSIBLE] - findValueOfExtraVars - ExtraVar not found : ${e.extraVar}`,
);
throw new Error('ExtraVars value not found !');
if (!e.local) {
throw new Error('ExtraVars value not found !');
}
} else {
substitutedExtraVars.push({
extraVar: e.extraVar,
value: value || undefined,
required: e.required,
canBeOverride: e.canBeOverride,
});
}
substitutedExtraVars.push({
extraVar: e.extraVar,
value: value || undefined,
required: e.required,
canBeOverride: e.canBeOverride,
});
}
logger.debug(substitutedExtraVars);
return substitutedExtraVars;
Expand Down
1 change: 1 addition & 0 deletions shared-lib/src/types/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -547,6 +547,7 @@ export type ExtraVar = {
value?: string;
required?: boolean;
canBeOverride?: boolean;
local?: boolean;
};

export type Image = {
Expand Down

0 comments on commit 119b00d

Please sign in to comment.