mirror of
https://github.com/semaphoreui/semaphore.git
synced 2024-11-27 02:52:14 +01:00
67a29f763b
- Define extra (environment) vars to tasks - Able to create custom ansible jobs by defining parameters (infinite usabilities for user here) - Log output to db - Debug tasks - Ssh key for accessing inventory (separate from the key to access inventory api) -
28 lines
686 B
Go
28 lines
686 B
Go
package models
|
|
|
|
import (
|
|
"strconv"
|
|
|
|
"github.com/ansible-semaphore/semaphore/database"
|
|
"github.com/ansible-semaphore/semaphore/util"
|
|
)
|
|
|
|
type AccessKey struct {
|
|
ID int `db:"id" json:"id"`
|
|
Name string `db:"name" json:"name" binding:"required"`
|
|
// 'aws/do/gcloud/ssh',
|
|
Type string `db:"type" json:"type" binding:"required"`
|
|
|
|
ProjectID *int `db:"project_id" json:"project_id"`
|
|
Key *string `db:"key" json:"key"`
|
|
Secret *string `db:"secret" json:"secret"`
|
|
}
|
|
|
|
func init() {
|
|
database.Mysql.AddTableWithName(AccessKey{}, "access_key").SetKeys(true, "id")
|
|
}
|
|
|
|
func (key AccessKey) GetPath() string {
|
|
return util.Config.TmpPath + "/access_key_" + strconv.Itoa(key.ID)
|
|
}
|