因此,由于一些严格的版本控制要求,我需要将我的Ansible版本降级2.1.1.0
为1.9.4
我该怎么做(最好用brew)?
如果没有酿造,那么这可能是一种选择.否则我听说使用虚拟环境也可能是一个不错的选择,这样我就可以轻松运行版本2.1.1.0或1.9.4,类似于rbenv的工作方式.
我正在尝试创建一个 kubernetes gitlab 运行程序,并且遇到了Failed to register the runner. You may be having network problems.
我知道gitlab.com
可以从我的主机访问的非常普遍的错误,但我需要更多信息来调试此问题的根本原因。
请注意,该错误确实会持续 30 次尝试,每次尝试与以下情况相同:
Registration attempt 8 of 30
Runtime platform arch=amd64 os=linux pid=107 revision=775dd39d version=13.8.0
WARNING: Running in user-mode.
WARNING: The user-mode requires you to manually start builds processing:
WARNING: $ gitlab-runner run
WARNING: Use sudo for system-mode:
WARNING: $ sudo gitlab-runner...
ERROR: Registering runner... failed runner=dh5qxNxL status=couldn't execute POST against https://gitlab.com/api/v4/runners: Post https://gitlab.com/api/v4/runners: EOF
PANIC: Failed to register the runner. You …
Run Code Online (Sandbox Code Playgroud) 我需要一种"
在provisioner "remote-exec"
我的terraform脚本块中使用常规引用的简单方法.只会"
对我想做的事情\"
起作用,只是尝试不起作用.什么是最简单的方法让terraform从字面上解释我的命令.这里是我想要运行的参考:
provisioner "remote-exec" {
inline = [
"echo 'DOCKER_OPTS="-H tcp://0.0.0.0:2375 -H unix:///var/run/docker.sock"' > /etc/default/docker",
]
}
Run Code Online (Sandbox Code Playgroud) 我使用ansible创建几个ec2实例,将文件复制到新创建的服务器中并在这些服务器上运行命令.问题是在创建服务器后,我仍然需要在以下ssh提示符中输入yes:
TASK [Adding /etc/rc.local2 to consul servers] *********************************
changed: [localhost -> 172.31.52.147] => (item={u'ip': u'172.31.52.147', u'number': 0})
The authenticity of host '172.31.57.20 (172.31.57.20)' can't be established.
ECDSA key fingerprint is 5e:c3:2e:52:10:29:1c:44:6f:d3:ac:10:78:10:01:89.
Are you sure you want to continue connecting (yes/no)? yes
changed: [localhost -> 172.31.57.20] => (item={u'ip': u'172.31.57.20', u'number': 1})
The authenticity of host '172.31.57.19 (172.31.57.19)' can't be established.
ECDSA key fingerprint is 4e:71:15:fe:c9:ec:3f:54:65:e8:a1:66:74:92:f4:ff.
Are you sure you want to continue connecting (yes/no)? yes
Run Code Online (Sandbox Code Playgroud)
如何让ansible忽略此提示并自动回答是?这里参考我的剧本:
---
- hosts: localhost
connection: …
Run Code Online (Sandbox Code Playgroud) 现在,我有一个Concourse管道脚本,可以从git repo更新dockerhub图像。我是根据以下教程创建的。我在这个git repo中有几个docker容器,我希望能够遍历它们,为每个不同的容器重复docker-image
资源和image-update
工作,以使我的脚本更加整洁和可读。这是我当前的脚本:
---
resources:
- name: resource-docker
type: git
source:
uri: https://github.com/$MYUSER/$MYREPO.git
branch: master
# docker-image resources
- name: first-container
type: docker-image
source:
repository: $MYUSER/first-container
- name: second-container
type: docker-image
source:
repository: $MYUSER/second-container
jobs:
# image-update jobs
- name: first-container-image-update
public: true
serial: true
plan:
- get: resource-docker
- put: first-container
params:
build: resource-docker/first-container
- name: second-container-image-update
public: true
serial: true
plan:
- get: resource-docker
- put: second-container
params:
build: resource-docker/second-container
Run Code Online (Sandbox Code Playgroud)
如何更改此设置,以便仅创建一个docker-image …
在a类中,应该如何测试是否设置了变量?现在,我只是在检查变量是否未定义:
if $http_port != undef {
$run_command = "$run_command --http-port $http_port"
}
Run Code Online (Sandbox Code Playgroud)
有没有更好的方法来检查变量是否已声明?
我发现我的 kubernetes 集群正在向 use.projectcalico.org 发送报告,如何禁用它以及它到底是如何使用 use.projectcalico.org 的?
我想在高山容器中添加terraform
版本0.12.21
,但我只能0.11.0
使用apk
. 如果我尝试将其添加为所需版本,则会出现以下错误:
/ # apk upgrade terraform==0.12.21-r0
OK: 192 MiB in 66 packages
/ # apk add terraform==0.12.21-r0
ERROR: unsatisfiable constraints:
terraform-0.11.0-r0:
breaks: world[terraform=0.12.21-r0]
Run Code Online (Sandbox Code Playgroud)
如何修复此 apk 错误?
我正在尝试创建一个动态作业,可以根据给定的标签在两个 gitlab 运行程序之间切换。我想用环境变量来做到这一点,但似乎不能使用。以下工作:
runner_test:
image: alpine
tags:
- $MY_RUNNER
stage: deploy_main
script:
- echo foobar
retry: 2
Run Code Online (Sandbox Code Playgroud)
导致管道暂停并出现错误: This job is stuck because you don't have any active runners online or available with any of these tags assigned to them: $MY_RUNNER
我正在努力将模板从 terraform 0.12.31 升级到 0.13.7,我们需要确保我们有一个自动系统来处理在旧版本下创建的部署。
null
我正在解决的一个问题是我在迁移中删除了所有提供商的使用。当我尝试使用 terraform 0.13 版本应用或计划在 0.12 上创建的状态文件时,我收到以下错误:
$ terraform plan --var-file MY_VAR_FILE.json
Refreshing Terraform state in-memory prior to plan...
The refreshed state will be used to calculate this plan, but will not be
persisted to local or remote state storage.
Error: Provider configuration not present
To work with
module.gcp_volt_site.module.ce_config.data.null_data_source.hosts_localhost
its original provider configuration at
provider["registry.terraform.io/-/null"] is required, but it has been removed.
This occurs when a provider configuration is removed while objects created by
that …
Run Code Online (Sandbox Code Playgroud) terraform ×3
ansible ×2
docker ×2
gitlab ×2
gitlab-ci ×2
kubernetes ×2
alpine-linux ×1
amazon-ec2 ×1
calico ×1
concourse ×1
git ×1
macos ×1
provisioning ×1
puppet ×1
ssh ×1