@@ -1054,7 +1054,7 @@ def generate_playbooks_and_hosts(self):
1054
1054
contextualizes = self .inf .radl .contextualize .get_contextualize_items_by_step ({1 : ctxts })
1055
1055
1056
1056
# create the files for the configure sections that appears in the contextualization steps
1057
- # and add the ansible information and modules
1057
+ # and add the ansible information and roles
1058
1058
for ctxt_num in contextualizes .keys ():
1059
1059
for ctxt_elem in contextualizes [ctxt_num ]:
1060
1060
if ctxt_elem .system in vm_group and ctxt_elem .get_ctxt_tool () == "Ansible" :
@@ -1503,7 +1503,7 @@ def create_general_conf_file(self, conf_file, vm_list):
1503
1503
Create the configuration file needed by the contextualization agent
1504
1504
"""
1505
1505
# Add all the roles and collections specified in the RADL
1506
- modules = []
1506
+ roles = []
1507
1507
collections = []
1508
1508
for s in self .inf .radl .systems :
1509
1509
for req_app in s .getApplications ():
@@ -1513,32 +1513,32 @@ def create_general_conf_file(self, conf_file, vm_list):
1513
1513
app_name = req_app .getValue ("name" )[16 :]
1514
1514
if req_app .getValue ("version" ):
1515
1515
app_name += ",%s" % req_app .getValue ("version" )
1516
- modules .append (app_name )
1516
+ roles .append (app_name )
1517
1517
elif req_app .getValue ("name" ).startswith ("ansible.roles." ):
1518
1518
# Get the roles specified by the user in the RADL
1519
1519
app_name = req_app .getValue ("name" )[14 :]
1520
1520
if req_app .getValue ("version" ):
1521
1521
app_name += ",%s" % req_app .getValue ("version" )
1522
- modules .append (app_name )
1522
+ roles .append (app_name )
1523
1523
elif req_app .getValue ("name" ).startswith ("ansible.collections." ):
1524
- # Get the modules specified by the user in the RADL
1524
+ # Get the collections specified by the user in the RADL
1525
1525
app_name = req_app .getValue ("name" )[20 :]
1526
1526
if req_app .getValue ("version" ):
1527
1527
app_name += ",%s" % req_app .getValue ("version" )
1528
1528
collections .append (app_name )
1529
1529
else :
1530
1530
# Get the info about the apps from the recipes DB
1531
- vm_modules , _ = Recipe .getInfoApps ([req_app ])
1532
- modules .extend (vm_modules )
1531
+ vm_roles , _ = Recipe .getInfoApps ([req_app ])
1532
+ roles .extend (vm_roles )
1533
1533
1534
1534
# avoid duplicates
1535
- modules = list (set (modules ))
1535
+ roles = list (set (roles ))
1536
1536
collections = list (set (collections ))
1537
1537
1538
1538
conf_data = {}
1539
1539
1540
1540
conf_data ['ansible_collections' ] = collections
1541
- conf_data ['ansible_modules ' ] = modules
1541
+ conf_data ['ansible_roles ' ] = roles
1542
1542
conf_data ['playbook_retries' ] = Config .PLAYBOOK_RETRIES
1543
1543
conf_data ['vms' ] = []
1544
1544
for vm in vm_list :
0 commit comments