streamline package naming

This commit is contained in:
Benjamin Diedrichsen
2026-07-29 13:07:34 +02:00
parent 1ba1c2a32a
commit 7e703c93b1
100 changed files with 141 additions and 139 deletions
@@ -0,0 +1,32 @@
# ssh-authorize
**Authorize SSH public key for a user**
## Purpose
This cube adds a specific SSH public key to a user's `authorized_keys` file on the remote server, allowing them to log in via SSH using the corresponding private key.
## Configuration
### Parameters
- **USER** (string, default: `'vagrant'`)
- The username on the remote server to authorize.
- If the user does not exist, `pyinfra` will attempt to create it (though a full user creation with shell/groups is better handled by `user-add`).
- **PUBKEY** (string, required)
- The actual content of the public key (e.g., `ssh-ed25519 AAAA...`).
## Use Cases
Grant access to a developer:
```javascript
exec('ssh-authorize', {
USER: 'developer',
PUBKEY: 'ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAA...'
})
```
## Dependencies
None.
@@ -0,0 +1,13 @@
from pyinfra import host
from pyinfra.operations import server
USER = host.data.USER
PUBKEY = host.data.PUBKEY
server.user(
name=f"Authorize public key for {USER}",
user=USER,
public_keys=[PUBKEY],
present=True,
_sudo=True
)
@@ -0,0 +1,12 @@
import { Manifest } from '@bitsquare/nopy-cubes';
import { z } from 'zod';
export default Manifest({
id: 'ssh:authorize',
name: 'Authorize SSH public key for a user',
dependencies: () => [],
schema: z.object({
USER: z.string().describe('Username to authorize').default('vagrant'),
PUBKEY: z.string().describe('SSH public key string').default(''),
}),
});