Closed PengBAI closed 3 years ago
@PengBAI Thanks for reporting this issue. Could you please provide helm repo list --output=yaml
before and after?
@PengBAI Thanks for reporting this issue. Could you please provide
helm repo list --output=yaml
before and after?
first run from scratch:
repo list before:
"stdout_lines": [
"[]"
]
add repo:
"stdout_lines": [
"\"my-repo\" has been added to your repositories"
]
repo list after:
"stdout_lines": [
"- name: my-repo",
" url: https://xxxxxxxxxxxxxxxxxxxxxxxx"
]
second run the same playbook:
repo list before:
"stdout_lines": [
"- name: my-repo",
" url: https://xxxxxxxxxxxxxxxxxxxxxxxx"
]
add repo:
"msg": "Repository already have a repository named my-repo"
if I run with command
helm repo add --username {{ helm_repo_username }} --password {{ helm_repo_password }} {{ helm_repo_name }} {{ helm_repo_url }}
it's OK, just skipping:
"stdout_lines": [
"\"my-repo\" already exists with the same configuration, skipping"
]
I'm using Helm 3 for information. So maybe a bug in some controls or checks in code
Hi @PengBAI, I would like to thank you for your quick replies. Could you kindly share the playbook you used? Also, I wanted to kindly ask you to ckeck whether both URLs of the repo (during the first and second execution of the playbook) are the same. Thank you.
hello all,
My bad... I set the variable as
helm_repo_url: " https://xxxxxxxxxxxxxxxx"
there is a leading space before https.
It's a users' entry error, but maybe add a trim on repo_url is better. what do you think
Hello @PengBAI, no problem! I am closing the issue since the problem was in the playbook.
SUMMARY
use module helm_repository to add helm repo
the first time of run playbook is OK. the second time is failed with
ISSUE TYPE
COMPONENT NAME
ANSIBLE VERSION
CONFIGURATION
OS / ENVIRONMENT
DISTRIB_ID=Ubuntu DISTRIB_RELEASE=20.04 DISTRIB_CODENAME=focal DISTRIB_DESCRIPTION="Ubuntu 20.04.1 LTS"
STEPS TO REPRODUCE