Using loop for less yum transactions