{"id":719,"date":"2022-08-10T01:58:30","date_gmt":"2022-08-10T00:58:30","guid":{"rendered":"http:\/\/192.168.1.213:8088\/?page_id=719"},"modified":"2022-08-10T09:33:16","modified_gmt":"2022-08-10T08:33:16","slug":"task-5-build-aci-pipeline-part-2","status":"publish","type":"page","link":"http:\/\/192.168.1.213:8088\/gitlab-cicd-workshop\/task-5-build-aci-pipeline-part-2\/","title":{"rendered":"Task 6: Build ACI pipeline part 2"},"content":{"rendered":"\t\t
Now edit the pipeline config again with the following code and commit the changes:\u00a0<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t
\n\t\t\t\t\n\t\t\t\t\tworkflow:\r\n rules:\r\n - if: $CI_COMMIT_BRANCH != \"main\" && $CI_PIPELINE_SOURCE != \"merge_request_event\" \r\n when: never\r\n - when: always\r\n\r\nstages:\r\n - prepare_aci\r\n - deploy_aci_config\r\n\r\nrun_prepare_playbook:\r\n stage: prepare_aci\r\n tags:\r\n - shell\r\n before_script:\r\n - ansible-galaxy collection install cisco.aci\r\n script:\r\n - ansible-playbook -i hosts create_snapshot.yml\r\n\r\nrun_deploy_playbook:\r\n stage: deploy_aci_config\r\n tags:\r\n - shell\r\n before_script:\r\n - ansible-galaxy collection install cisco.aci\r\n script:\r\n - ansible-playbook -i hosts playbook.yml<\/xmp>\n\t\t\t\t<\/code>\n\t\t\t<\/pre>\n\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t\tView directly the pipeline results from the pipeline editor:<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t
\n\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/a>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/a>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t\tLogin to ACI and check if the snapshot has been created:<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t
\n\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/a>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\n\t\t\t\t\n\t\t\tChanging the ACI Config<\/h5>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t\tYou might have wondered where all the ACI config comes from. The file which contains all data is the ansible.yml<\/strong> file.
Go to the repository and click on the file to show the content:<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/a>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t\tClick on the blue button “Open in Web IDE”. This a very nice feature to work with files inside of the browser.<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t
\n\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/a>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t\tNow scroll down to the tenant section which starts at line 59. Copy the data as follows to create a second tenant:<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t
\n\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t\tCommit the change<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t
\n\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/a>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t\tCommit to the main branch:<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t