ansible-container
ansible-container copied to clipboard
Do not force to set a namespace
ISSUE TYPE
- Feature Idea
container.yml
version: '2'
settings:
conductor_base: centos:7
project_name : meh
registries:
aws:
url: https://asdasdasdas.dkr.ecr.eu-west-1.amazonaws.com/
namespace: base
repository_prefix: ""
services:
base:
from : centos:7
command :
- /bin/bash
- -c
- sleep infinity
roles:
- do-stuff
SUMMARY
When pushing to a registry, ansible-container gets the registry name and automatically constructs the url like:
{{ registries.{{ name }}.url }}/{{ namespace }}/{{ services.{{ name }} }}
Or, following the above config:
684730133717.dkr.ecr.eu-west-1.amazonaws.com/base/base
On registries like the AWS one, there's no namespace. When setting namespace to "" like the repository_prefix
, then the repository_prefix
will be the project_name
. So if still there's not a method to set namespace
to a null value, it would be awesome to do so.
actually AWS ECR has namespace design with optionally.
from aws ecr create-repository help
:
--repository-name (string)
The name to use for the repository. The repository name may be spec-
ified on its own (such as nginx-web-app ) or it can be prepended
with a namespace to group the repository into a category (such as
project-a/nginx-web-app ).
note the value.