我正在尝试使用 Terraform 创建用户和组,但是当我通过 CoreOS 运行实例时,它失败并出现错误:
[ 298.037882] ignition[2052]: files: createGroups: op(1): [failed] adding group "vault": exit status 9: Cmd: "/usr/sbin/groupadd" "--root" "/sysroot" "--gid" "1001" "--password" "*" "vault" Stdout: "" Stderr: "groupadd: group 'vault' already exists\n"
[
HCL 如下:
data "ignition_group" "vault" {
name = "vault"
gid = 1001
}
data "ignition_user" "vault" {
name = "vault"
shell = "/bin/false"
no_create_home = false
uid = 1000
system = true
no_user_group = true
primary_group = data.ignition_group.vault.gid
}
这里有什么问题吗?