Closed vexx32 closed 1 year ago
ansible-galaxy doesn't support publishing to multiple servers at once
Instead, we need to specify each server, along with their api keys.
I tested this configuration by:
build
vagrant up
vagrant ssh choco_ansible_server
vim chocolatey/galaxy.yml
:x
touch ansible-custom.config
vim ansible-custom.config
ansible.cfg
export ANSIBLE_CONFIG=/home/vagrant/ansible-custom.cfg export ANSIBLE_GALAXY_SERVER_AUTOMATION_HUB_TOKEN=junktokenvalue
cd chocolatey ansible-galaxy collection build ansible-galaxy collection publish *.tar.gz --server automation_hub
401
Unauthorized
Publishing collection artifact '/home/vagrant/chocolatey/chocolatey-chocolatey-1.4.0.tar.gz' to automation_hub https://cloud.redhat.com/api/automation-hub/content/inbound-chocolatey/ ERROR! Error when publishing collection to automation_hub (https://cloud.redhat.com/api/automation-hub/content/inbound-chocolatey/) (HTTP Code: 400, Message: Artifact already exists Code: invalid)
N/A
Fixes #112
Thanks for sorting this out, @vexx32!
Description Of Changes
Motivation and Context
ansible-galaxy doesn't support publishing to multiple servers at once
Instead, we need to specify each server, along with their api keys.
Testing
I tested this configuration by:
build
folder,vagrant up
vagrant ssh choco_ansible_server
vim chocolatey/galaxy.yml
:x
)touch ansible-custom.config
vim ansible-custom.config
ansible.cfg
file from this PR401
(Unauthorized
) errorOperating Systems Testing
N/A
Change Types Made
Change Checklist
Related Issue
Fixes #112