[PR #579] [MERGED] fix: check if first admin is already in adminAccounts #587

Closed
opened 2026-05-07 00:21:38 +02:00 by BreizhHardware · 0 comments

📋 Pull Request Information

Original PR: https://github.com/ovh/the-bastion/pull/579
Author: @jon4hz
Created: 9/8/2025
Status: Merged
Merged: 9/8/2025
Merged by: @speed47

Base: masterHead: check-admin-account


📝 Commits (1)

  • 5b467cd fix: check if first admin is already in adminAccounts

📊 Changes

1 file changed (+14 additions, -1 deletions)

View changed files

📝 bin/admin/setup-first-admin-account.sh (+14 -1)

📄 Description

Hi,

This PR adds a check to only add the first admin to the adminAccounts if it isn't configure yet.

For context: I'm writing an ansible role for test bastion that templates the bastion.conf. If the setup-first-admin-account.sh script writes to the bastion.conf as well, it breaks the idempotency of my role.

PS: The ansible role should be open sourced soon. I can open a PR to mention it in your README, if that's something you're interested in.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ovh/the-bastion/pull/579 **Author:** [@jon4hz](https://github.com/jon4hz) **Created:** 9/8/2025 **Status:** ✅ Merged **Merged:** 9/8/2025 **Merged by:** [@speed47](https://github.com/speed47) **Base:** `master` ← **Head:** `check-admin-account` --- ### 📝 Commits (1) - [`5b467cd`](https://github.com/ovh/the-bastion/commit/5b467cd14960606c0790cad38f5473a327c2da82) fix: check if first admin is already in adminAccounts ### 📊 Changes **1 file changed** (+14 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `bin/admin/setup-first-admin-account.sh` (+14 -1) </details> ### 📄 Description Hi, This PR adds a check to only add the first admin to the `adminAccounts` if it isn't configure yet. For context: I'm writing an ansible role for test bastion that templates the `bastion.conf`. If the `setup-first-admin-account.sh` script writes to the `bastion.conf` as well, it breaks the idempotency of my role. PS: The ansible role should be open sourced soon. I can open a PR to mention it in your README, if that's something you're interested in. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
BreizhHardware 2026-05-07 00:21:38 +02:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/the-bastion#587
No description provided.