Skip to content

Commit 42b62b6

Browse files
authored
Merge pull request #14339 from ggbecker/fix-refresh-redhatofficial-repo
Fix ansible playbook to role script
2 parents 9bf36fe + e05dfa8 commit 42b62b6

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

utils/ansible_playbook_to_role.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -433,12 +433,7 @@ def _get_contents(self, path_name, branch='main'):
433433
def _remote_content(self, filepath):
434434
# We want the raw string to compare against _local_content
435435

436-
# any version higher than rhel8 should use branch main
437-
branch = 'main'
438-
if "rhel8" in self.remote_repo.full_name:
439-
branch = 'master'
440-
441-
content, sha = self._get_contents(filepath, branch)
436+
content, sha = self._get_contents(filepath, 'main')
442437
return content, sha
443438

444439
def _update_content_if_needed(self, filepath):
@@ -569,10 +564,9 @@ def main():
569564
create_empty_repositories(github_new_repos, github_org)
570565

571566
locally_clone_and_init_repositories(args.organization, github_new_repos)
572-
573567
# Update repositories
574568
for repo in sorted(github_org.get_repos(), key=lambda repo: repo.name):
575-
if repo.name in selected_roles:
569+
if repo.name in selected_roles.keys():
576570
playbook_filename = "%s-playbook-%s.yml" % selected_roles[repo.name]
577571
playbook_full_path = os.path.join(
578572
args.build_playbooks_dir, playbook_filename)

0 commit comments

Comments
 (0)