mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Merge pull request #13029 from willthames/allow_commented_out_roles
Allow blank lines and comments/spaces in galaxy spec files
This commit is contained in:
commit
89bf30d885
2 changed files with 6 additions and 0 deletions
|
@ -328,6 +328,8 @@ class GalaxyCLI(CLI):
|
||||||
self.display.deprecated("going forward only the yaml format will be supported")
|
self.display.deprecated("going forward only the yaml format will be supported")
|
||||||
# roles listed in a file, one per line
|
# roles listed in a file, one per line
|
||||||
for rline in f.readlines():
|
for rline in f.readlines():
|
||||||
|
if rline.startswith("#") or rline.strip() == '':
|
||||||
|
continue
|
||||||
self.display.debug('found role %s in text file' % str(rline))
|
self.display.debug('found role %s in text file' % str(rline))
|
||||||
role = RoleRequirement.role_yaml_parse(rline.strip())
|
role = RoleRequirement.role_yaml_parse(rline.strip())
|
||||||
roles_left.append(GalaxyRole(self.galaxy, **role))
|
roles_left.append(GalaxyRole(self.galaxy, **role))
|
||||||
|
|
|
@ -1,4 +1,8 @@
|
||||||
|
# deliberate non-empty whitespace line to follow
|
||||||
|
|
||||||
|
|
||||||
git+https://bitbucket.org/willthames/git-ansible-galaxy,v1.6
|
git+https://bitbucket.org/willthames/git-ansible-galaxy,v1.6
|
||||||
hg+https://bitbucket.org/willthames/hg-ansible-galaxy
|
hg+https://bitbucket.org/willthames/hg-ansible-galaxy
|
||||||
https://bitbucket.org/willthames/http-ansible-galaxy/get/master.tar.gz,,http-role
|
https://bitbucket.org/willthames/http-ansible-galaxy/get/master.tar.gz,,http-role
|
||||||
|
# comment
|
||||||
git+git@github.com:geerlingguy/ansible-role-php.git
|
git+git@github.com:geerlingguy/ansible-role-php.git
|
||||||
|
|
Loading…
Reference in a new issue