简体   繁体   English

点火失败,因为组已存在

[英]Ignition fails because group already exists

I'm trying to create a user and group with Terraform but when I run the instance via CoreOS it fails with the error:我正在尝试使用 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"
[

The HCL is the following: 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
}

Anything wrong here?这里有什么问题吗?

这失败了,因为已经有一个具有相同 uid 但名称不同的现有用户,在 Linux 中,重要的是 ID 而不是名称

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 AWS 安装失败:IAM 实例配置文件已存在 - AWS install fails: IAM instance profile already exists 如果资源组已存在于 Azure 中,则让 Terraform 在 Azure 中跳过“应用”DevOps 构建管道 - Having Terraform skip "apply" in Azure DevOps build pipeline if the resource group already exists in Azure 通过附加已存在的安全组使用 terraform 创建 ec2 实例 - Creating an ec2 instance using terraform by attaching a security group that already exists Terraform - 即使应用了 terraform 的部分后端,资源组已经存在 - Terraform - Rescource group already exists even though part of backend with terraform apply Terraform 该ID的资源已经存在 - Terraform resource with the ID already exists Terraform ID 资源已存在 - Terraform resource with the ID already exists Terraform 配置未使用其他文件中的 output 来获取已创建的资源,而是尝试重新创建它并失败(安全组 ID) - Terraform config isn't using output from other file for already created resource, instead tries to recreate it and fails (security group id) configmaps“aws-auth”已经存在 - configmaps "aws-auth" already exists 如何解决管道中模块已存在的错误 - how to solve module already exists error in pipeline 由于身份验证,在 Azure 管道中执行 Terraform 失败 - Executing Terraform in Azure pipelines fails because of authentication
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM