Using ansible 2.1.0.0 I'd like to have a role that lists private source control repositories like this in the meta/main.yml: dependencies: - src: '[email protected]:/anisble/myrole.git,v1.0.0'
Is this possible? I got this idea from this post: https://opencredo.com/reusing-ansible-roles-with-private-git-repos-and-dependencies/ When I try this running ansible 2.1.0.0, I get: ERROR! role definitions must contain a role name The error appears to have been in '/vagrant/roles/mainrole/meta/main.yml': line 157, column 5, but may be elsewhere in the file depending on the exact syntax problem. The offending line appears to be: dependencies: - src: '[email protected]:/anisble/myrole.git,v1.0.0' ^ here This one looks easy to fix. It seems that there is a value started with a quote, and the YAML parser is expecting to see the line ended with the same kind of quote. For instance: when: "ok" in result.stdout Could be written as: when: '"ok" in result.stdout' Or equivalently: when: "'ok' in result.stdout" If I add the extra quotes: (- "src: '[email protected]:/anisble/myrole.git,v1.0.0'") [DEPRECATION WARNING]: The comma separated role spec format, use the yaml/explicit format instead.. This feature will be removed in a future release. Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg. ERROR! the role 'myrole' was not found in /vagrant/roles:/vagrant:/etc/ansible/roles:/vagrant/roles When I run it with ansible version 1.9.6 I get: ERROR: cannot find role in /vagrant/roles/myrole.git or /vagrant/myrole.git or /etc/ansible/roles/myrole.git I know I can pull these separately with ansible-galaxy install -r requirements.yml, but I'd rather skip that step so I can do this all at once with a single ansible-pull command. Thanks, Brian -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/1903af89-5735-4a85-aad9-1e49ab8e0743%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
