Add-SFTP-User/add-sftp.jps

75 lines
1.6 KiB
Plaintext
Raw Normal View History

2023-10-23 17:21:47 +00:00
type: update
name: Add SFTP User
targetNodes:
nodeGroup: cp
user: root
globals:
username: "user${fn.random(10000,99999)}"
2023-10-23 17:21:47 +00:00
password: ${fn.password(min)}
sftpHost: ${env.domain}
sftpPort: 22
2023-10-23 17:21:47 +00:00
actions:
add_sftp_user:
2023-10-24 17:16:41 +00:00
script: /scripts/add-sftp-user.cs?_r=${fn.random}&enable_ssh=${settings.enable_ssh}
2023-10-23 17:21:47 +00:00
success:
email: |
2023-10-24 17:16:41 +00:00
Connection Details<br>
2023-10-24 17:36:38 +00:00
<br>
2023-10-24 17:16:41 +00:00
SFTP Host: ${globals.sftpHost}<br>
Port: ${globals.sftpPort}<br>
2023-10-24 17:36:38 +00:00
<br>
2023-10-24 17:16:41 +00:00
Login Credentials<br>
2023-10-24 17:36:38 +00:00
<br>
2023-10-24 17:16:41 +00:00
Username: ${globals.username}<br>
Password: ${globals.password}
2023-10-23 17:21:47 +00:00
text:
en: |
2023-10-24 17:36:38 +00:00
Connection Details
SFTP Host: ${globals.sftpHost}
Port: ${globals.sftpPort}
Login Credentials
Username: ${globals.username}
Password: ${globals.password}
2023-10-24 17:16:41 +00:00
2023-10-23 17:21:47 +00:00
settings:
sftpForm:
fields:
- type: string
inputType: text
name: username
caption: Username
2023-10-24 17:16:41 +00:00
placeholder: "user${fn.random(10000,99999)}"
2023-10-23 17:21:47 +00:00
disabled: true
required: false
- type: string
inputType: password
name: password
caption: Password
2023-10-24 17:16:41 +00:00
placeholder: "${fn.password(min)}"
2023-10-23 17:21:47 +00:00
disabled: true
required: false
- type: string
inputType: text
name: root_directory
caption: Root Directory
default: "/var/www/webroot/ROOT"
required: true
- type: checkbox
name: enable_ssh
caption: Also enable SSH access
default: false
buttons:
- settings: sftpForm
action: add_sftp_user
caption: Add SFTP User
confirmText: "Are you sure you want to add this SFTP user?"