test_control_plane.yml 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709
  1. # Copyright 2020 Dell Inc. or its subsidiaries. All Rights Reserved.
  2. #
  3. # Licensed under the Apache License, Version 2.0 (the "License");
  4. # you may not use this file except in compliance with the License.
  5. # You may obtain a copy of the License at
  6. #
  7. # http://www.apache.org/licenses/LICENSE-2.0
  8. #
  9. # Unless required by applicable law or agreed to in writing, software
  10. # distributed under the License is distributed on an "AS IS" BASIS,
  11. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. # See the License for the specific language governing permissions and
  13. # limitations under the License.
  14. ---
  15. # Testase OMNIA_1.1_MS_TC_001
  16. # Test Case to validate the execution of control_plane.yml with valid inputs -- Default Test Case
  17. - name: OMNIA_1.1_MS_TC_001
  18. hosts: localhost
  19. connection: local
  20. vars_files:
  21. - ../roles/control_plane_common/vars/main.yml
  22. - test_vars/test_control_plane_vars.yml
  23. gather_subset:
  24. - 'min'
  25. tags: VERIFY_OMNIA_01
  26. tasks:
  27. - name: Check OS Version
  28. assert:
  29. that:
  30. - 'ansible_distribution == "{{ os_name }}"'
  31. - 'ansible_distribution_version == "{{ os_version }}"'
  32. success_msg: "{{ check_os_success_msg }}"
  33. fail_msg: "{{ check_os_fail_msg }}"
  34. tags: Check_OS
  35. - name: Replace input parameters folder
  36. copy:
  37. src: "{{ item }}"
  38. dest: "{{ input_params_folder }}"
  39. force: yes
  40. mode: '0644'
  41. with_items:
  42. - "{{ input_files_tc01 }}"
  43. tags: Replace_input
  44. - block:
  45. - name: Execute control_plane.yml playbook
  46. command: ansible-playbook control_plane.yml
  47. args:
  48. chdir: "{{ control_plane_dir }}"
  49. tags: Execute_control_plane
  50. - block:
  51. - name: Execute default validation script
  52. include_tasks: "{{ control_plane_validation_script_path }}"
  53. tags: Execute_Validation_Script
  54. # Testcase OMNIA_1.1_MS_TC_002
  55. # Test Case to validate the execution of control_place.yml with no input
  56. - name: OMNIA_1.1_MS_TC_002
  57. hosts: localhost
  58. connection: local
  59. vars_files:
  60. - ../roles/control_plane_common/vars/main.yml
  61. - test_vars/test_control_plane_vars.yml
  62. gather_subset:
  63. - 'min'
  64. tags: TC_002
  65. tasks:
  66. - name: Check OS Version
  67. assert:
  68. that:
  69. - 'ansible_distribution == "{{ os_name }}"'
  70. - 'ansible_distribution_version == "{{ os_version }}"'
  71. success_msg: "{{ check_os_success_msg }}"
  72. fail_msg: "{{ check_os_fail_msg }}"
  73. tags: Check_OS
  74. - name: Replace input parameters folder
  75. copy:
  76. src: "{{ item }}"
  77. dest: "{{ input_params_folder }}"
  78. force: yes
  79. mode: '0644'
  80. with_items:
  81. - "{{ input_files_tc02 }}"
  82. tags: Replace_input
  83. - block:
  84. - name: Execute control_plane_common role
  85. include_role:
  86. name: ../roles/control_plane_common
  87. vars:
  88. base_vars_filename: ../input_params/base_vars.yml
  89. rescue:
  90. - name: Validate error
  91. assert:
  92. that: input_base_failure_msg in ansible_failed_result.msg
  93. success_msg: "{{ input_config_check_success_msg }}"
  94. fail_msg: "{{ input_config_check_fail_msg }}"
  95. tags: Execute_common_role
  96. # Testcase OMNIA_1.1_MS_TC_003 and OMNIA_1.1_MS_TC_004
  97. # Test Case to validate the execution of control_plane.yml with NFS share already present
  98. - name: OMNIA_1.1_MS_TC_003
  99. hosts: localhost
  100. connection: local
  101. vars_files:
  102. - ../roles/control_plane_common/vars/main.yml
  103. - test_vars/test_control_plane_vars.yml
  104. gather_subset:
  105. - 'min'
  106. tags: TC_003,TC_004
  107. tasks:
  108. - name: Check OS Version
  109. assert:
  110. that:
  111. - 'ansible_distribution == "{{ os_name }}"'
  112. - 'ansible_distribution_version == "{{ os_version }}"'
  113. success_msg: "{{ check_os_success_msg }}"
  114. fail_msg: "{{ check_os_fail_msg }}"
  115. tags: Check_OS
  116. - name: Replace input parameters folder
  117. copy:
  118. src: "{{ item }}"
  119. dest: "{{ input_params_folder }}"
  120. force: yes
  121. mode: '0644'
  122. with_items:
  123. - "{{ input_files_tc01 }}"
  124. tags: Replace_input
  125. - name: Creating new control_plane.yml
  126. copy:
  127. dest: "../test_control_plane.yml"
  128. content: |
  129. - name: Executing omnia roles
  130. hosts: localhost
  131. connection: local
  132. roles:
  133. - control_plane_common
  134. - control_plane_repo
  135. mode: '0644'
  136. tags: Replace_control_plane
  137. - block:
  138. - name: Execute control_plane.yml playbook
  139. command: ansible-playbook test_control_plane.yml
  140. args:
  141. chdir: "{{ control_plane_dir }}"
  142. tags: Execute_control_plane
  143. - block:
  144. - name: Execute validation script
  145. include_tasks: "{{ control_plane_validation_script_path }}"
  146. tags: Execute_Validation_Script
  147. - name: Delete newly created control_plane.yml
  148. file:
  149. state: absent
  150. path: ../test_control_plane.yml
  151. when: foo_stat.stat.exists
  152. tags: Delete_test_control_plane
  153. # Testcase OMNIA_1.1_MS_TC_005
  154. # Test Case to validate the execution of control_plane.yml after a successful run and validate k8s pods along with services after reboot.
  155. - name: OMNIA_1.1_MS_TC_005
  156. hosts: localhost
  157. connection: local
  158. vars_files:
  159. - ../roles/control_plane_common/vars/main.yml
  160. - test_vars/test_control_plane_vars.yml
  161. gather_subset:
  162. - 'min'
  163. tags: TC_005
  164. tasks:
  165. - name: Check OS Version
  166. assert:
  167. that:
  168. - 'ansible_distribution == "{{ os_name }}"'
  169. - 'ansible_distribution_version == "{{ os_version }}"'
  170. success_msg: "{{ check_os_success_msg }}"
  171. fail_msg: "{{ check_os_fail_msg }}"
  172. tags: Check_OS
  173. - name: Check uptime
  174. command: uptime -p
  175. register: system_uptime
  176. changed_when: false
  177. tags: Check_Uptime
  178. - name: Extracting data from system_uptime
  179. set_fact:
  180. uptime_number: "{{ system_uptime.stdout.split()[1] }}"
  181. uptime_min: "{{ system_uptime.stdout.split()[2] }}"
  182. - name: Replace input parameters folder
  183. copy:
  184. src: "{{ item }}"
  185. dest: "{{ input_params_folder }}"
  186. force: yes
  187. mode: '0644'
  188. with_items:
  189. - "{{ input_files_tc01 }}"
  190. when: uptime_number|int > 15
  191. tags: Replace_input
  192. - block:
  193. - name: Execute control_plane.yml playbook
  194. command: ansible-playbook control_plane.yml
  195. args:
  196. chdir: "{{ control_plane_dir }}"
  197. when: uptime_number|int > 15
  198. tags: Execute_control_plane
  199. - name: Reboot system
  200. command: reboot
  201. when: uptime_number|int > 15
  202. tags: Reboot_System
  203. - block:
  204. - name: Wait for 30sec for kubectl to get things ready
  205. pause:
  206. seconds: 200
  207. when: (uptime_number| int <= 15) and (uptime_min == "minutes")
  208. - name: Execute default validation script
  209. include_tasks: "{{ control_plane_validation_script_path }}"
  210. when: (uptime_number| int <= 15) and (uptime_min == "minutes")
  211. tags: Execute_Validation_Script
  212. # Testcase OMNIA_1.1_MS_TC_006 and OMNIA_1.1_MS_TC_007
  213. # Test Case to validate the execution of control_plane.yml and after a successful run the user deletes/stops all pods
  214. - name: OMNIA_1.1_MS_TC_006
  215. hosts: localhost
  216. connection: local
  217. vars_files:
  218. - ../roles/control_plane_common/vars/main.yml
  219. - test_vars/test_control_plane_vars.yml
  220. gather_subset:
  221. - 'min'
  222. tags: TC_006,TC_007
  223. tasks:
  224. - name: Check OS Version
  225. assert:
  226. that:
  227. - 'ansible_distribution == "{{ os_name }}"'
  228. - 'ansible_distribution_version == "{{ os_version }}"'
  229. success_msg: "{{ check_os_success_msg }}"
  230. fail_msg: "{{ check_os_fail_msg }}"
  231. tags: Check_OS
  232. - name: Replace input parameters folder
  233. copy:
  234. src: "{{ item }}"
  235. dest: "{{ input_params_folder }}"
  236. force: yes
  237. mode: "0644"
  238. with_items:
  239. - "{{ input_files_tc01 }}"
  240. tags: Replace_input
  241. - block:
  242. - name: Execute control_plane.yml playbook
  243. command: ansible-playbook control_plane.yml
  244. args:
  245. chdir: "{{ control_plane_dir }}"
  246. tags: Execute_control_plane
  247. - name: Delete all containers
  248. command: kubectl delete --all namespaces
  249. changed_when: false
  250. tags: Delete_Pods
  251. - block:
  252. - name: Execute control_plane.yml playbook
  253. command: ansible-playbook control_plane.yml
  254. args:
  255. chdir: "{{ control_plane_dir }}"
  256. tags: Execute_control_plane
  257. - block:
  258. - name: Execute default validation script
  259. include_tasks: "{{ control_plane_validation_script_path }}"
  260. tags: Execute_Validation_Script
  261. # Testcase OMNIA_1.1_MS_TC_008
  262. # Test Case to validate the execution of control_plane.yml with infiniband=false, powervault=true and ethernet=true
  263. - name: OMNIA_1.1_MS_TC_008
  264. hosts: localhost
  265. connection: local
  266. vars_files:
  267. - ../roles/control_plane_common/vars/main.yml
  268. - test_vars/test_control_plane_vars.yml
  269. gather_subset:
  270. - 'min'
  271. tags: TC_008
  272. tasks:
  273. - name: Check OS Version
  274. assert:
  275. that:
  276. - 'ansible_distribution == "{{ os_name }}"'
  277. - 'ansible_distribution_version == "{{ os_version }}"'
  278. success_msg: "{{ check_os_success_msg }}"
  279. fail_msg: "{{ check_os_fail_msg }}"
  280. tags: Check_OS
  281. - name: Replace input parameters folder
  282. copy:
  283. src: "{{ item }}"
  284. dest: "{{ input_params_folder }}"
  285. force: yes
  286. mode: '0644'
  287. with_items:
  288. - "{{ input_files_tc01 }}"
  289. tags: Replace_input
  290. - name: Editing base_vars.yml for powervault to true
  291. replace:
  292. path: ../input_params/base_vars.yml
  293. regexp: "{{ powervault_false }}"
  294. replace: "{{ powervault_true }}"
  295. tags: Edit_base_vars
  296. - name: Editing base_vars.yml for ethernet to true
  297. replace:
  298. path: ../input_params/base_vars.yml
  299. regexp: "{{ ethernet_false }}"
  300. replace: "{{ ethernet_true }}"
  301. tags: Edit_base_vars
  302. - name: Editing base_vars.yml for infiniband to false
  303. replace:
  304. path: ../input_params/base_vars.yml
  305. regexp: "{{ infiniband_true }}"
  306. replace: "{{ infiniband_false }}"
  307. tags: Edit_base_vars
  308. - block:
  309. - name: Execute control_plane.yml playbook
  310. command: ansible-playbook control_plane.yml
  311. args:
  312. chdir: "{{ control_plane_dir }}"
  313. tags: Execute_control_plane
  314. - block:
  315. - name: Execute default validation script
  316. include_tasks: "{{ control_plane_validation_script_path }}"
  317. tags: Execute_Validation_Script
  318. # Testcase OMNIA_1.1_MS_TC_009
  319. # Test Case to validate the execution of control_plane.yml with infiniband=true, powervault=false and ethernet=true
  320. - name: OMNIA_1.1_MS_TC_009
  321. hosts: localhost
  322. connection: local
  323. vars_files:
  324. - ../roles/control_plane_common/vars/main.yml
  325. - test_vars/test_control_plane_vars.yml
  326. gather_subset:
  327. - 'min'
  328. tags: TC_009
  329. tasks:
  330. - name: Check OS Version
  331. assert:
  332. that:
  333. - 'ansible_distribution == "{{ os_name }}"'
  334. - 'ansible_distribution_version == "{{ os_version }}"'
  335. success_msg: "{{ check_os_success_msg }}"
  336. fail_msg: "{{ check_os_fail_msg }}"
  337. tags: Check_OS
  338. - name: Replace input parameters folder
  339. copy:
  340. src: "{{ item }}"
  341. dest: "{{ input_params_folder }}"
  342. force: yes
  343. mode: '0644'
  344. with_items:
  345. - "{{ input_files_tc01 }}"
  346. tags: Replace_input
  347. - name: Editing base_vars.yml for powervault to false
  348. replace:
  349. path: ../input_params/base_vars.yml
  350. regexp: "{{ powervault_true }}"
  351. replace: "{{ powervault_false }}"
  352. tags: Edit_base_vars
  353. - name: Editing base_vars.yml for ethernet to true
  354. replace:
  355. path: ../input_params/base_vars.yml
  356. regexp: "{{ ethernet_false }}"
  357. replace: "{{ ethernet_true }}"
  358. tags: Edit_base_vars
  359. - name: Editing base_vars.yml for infiniband to true
  360. replace:
  361. path: ../input_params/base_vars.yml
  362. regexp: "{{ infiniband_false }}"
  363. replace: "{{ infiniband_true }}"
  364. tags: Edit_base_vars
  365. - block:
  366. - name: Execute control_plane.yml playbook
  367. command: ansible-playbook control_plane.yml
  368. args:
  369. chdir: "{{ control_plane_dir }}"
  370. tags: Execute_control_plane
  371. - block:
  372. - name: Execute default validation script
  373. include_tasks: "{{ control_plane_validation_script_path }}"
  374. tags: Execute_Validation_Script
  375. # Testcase OMNIA_1.1_MS_TC_010
  376. # Test Case to validate the execution of control_plane.yml with infiniband=true, powervault=true and ethernet=false
  377. - name: OMNIA_1.1_MS_TC_010
  378. hosts: localhost
  379. connection: local
  380. vars_files:
  381. - ../roles/control_plane_common/vars/main.yml
  382. - test_vars/test_control_plane_vars.yml
  383. gather_subset:
  384. - 'min'
  385. tags: TC_010
  386. tasks:
  387. - name: Check OS Version
  388. assert:
  389. that:
  390. - 'ansible_distribution == "{{ os_name }}"'
  391. - 'ansible_distribution_version == "{{ os_version }}"'
  392. success_msg: "{{ check_os_success_msg }}"
  393. fail_msg: "{{ check_os_fail_msg }}"
  394. tags: Check_OS
  395. - name: Replace input parameters folder
  396. copy:
  397. src: "{{ item }}"
  398. dest: "{{ input_params_folder }}"
  399. force: yes
  400. mode: '0644'
  401. with_items:
  402. - "{{ input_files_tc01 }}"
  403. tags: Replace_input
  404. - name: Editing base_vars.yml for powervault to true
  405. replace:
  406. path: ../input_params/base_vars.yml
  407. regexp: "{{ powervault_false }}"
  408. replace: "{{ powervault_true }}"
  409. tags: Edit_base_vars
  410. - name: Editing base_vars.yml for ethernet to false
  411. replace:
  412. path: ../input_params/base_vars.yml
  413. regexp: "{{ ethernet_true }}"
  414. replace: "{{ ethernet_false }}"
  415. tags: Edit_base_vars
  416. - name: Editing base_vars.yml for infiniband to true
  417. replace:
  418. path: ../input_params/base_vars.yml
  419. regexp: "{{ infiniband_false }}"
  420. replace: "{{ infiniband_true }}"
  421. tags: Edit_base_vars
  422. - block:
  423. - name: Execute control_plane.yml playbook
  424. command: ansible-playbook control_plane.yml
  425. args:
  426. chdir: "{{ control_plane_dir }}"
  427. tags: Execute_control_plane
  428. - block:
  429. - name: Execute default validation script
  430. include_tasks: "{{ control_plane_validation_script_path }}"
  431. tags: Execute_Validation_Script
  432. # Testcase OMNIA_1.1_MS_TC_011
  433. # Test Case to validate the execution of control_plane.yml with firmware update set to False
  434. - name: OMNIA_1.1_MS_TC_011
  435. hosts: localhost
  436. connection: local
  437. vars_files:
  438. - ../roles/control_plane_common/vars/main.yml
  439. - test_vars/test_control_plane_vars.yml
  440. gather_subset:
  441. - 'min'
  442. tags: TC_011
  443. tasks:
  444. - name: Check OS Version
  445. assert:
  446. that:
  447. - 'ansible_distribution == "{{ os_name }}"'
  448. - 'ansible_distribution_version == "{{ os_version }}"'
  449. success_msg: "{{ check_os_success_msg }}"
  450. fail_msg: "{{ check_os_fail_msg }}"
  451. tags: Check_OS
  452. - name: Set firmware update to false
  453. replace:
  454. path: ../input_params/idrac_vars.yml
  455. regexp: "{{ fw_update_true }}"
  456. replace: "{{ fw_update_false }}"
  457. tags: Set_FW_Update
  458. - name: Replace input parameters folder
  459. copy:
  460. src: "{{ item }}"
  461. dest: "{{ input_params_folder }}"
  462. force: yes
  463. mode: '0644'
  464. with_items:
  465. - "{{ input_files_tc01 }}"
  466. tags: Replace_input
  467. - block:
  468. - name: Execute control_plane.yml playbook
  469. command: ansible-playbook control_plane.yml
  470. args:
  471. chdir: "{{ control_plane_dir }}"
  472. tags: Execute_control_plane
  473. - block:
  474. - name: Execute default validation script
  475. include_tasks: "{{ control_plane_validation_script_path }}"
  476. tags: Execute_Validation_Script
  477. - name: Check if firmware updates folder exists
  478. stat:
  479. path: /var/nfs_repo/dellupdates
  480. register: fw_update_dir
  481. tags: Set_FW_Update
  482. - name: Verify firmware updates were downloaded
  483. assert:
  484. that:
  485. - not fw_update_dir.stat.exists
  486. success_msg: "{{ fw_success_validation }}"
  487. fail_msg: "{{ fw_fail_validation }}"
  488. tags: Set_FW_Update
  489. # Testcase OMNIA_1.1_MS_TC_012
  490. # Test Case to validate the execution of control_plane.yml with firmware update set to true
  491. - name: OMNIA_1.1_MS_TC_012
  492. hosts: localhost
  493. connection: local
  494. vars_files:
  495. - ../roles/control_plane_common/vars/main.yml
  496. - test_vars/test_control_plane_vars.yml
  497. gather_subset:
  498. - 'min'
  499. tags: TC_012
  500. tasks:
  501. - name: Check OS Version
  502. assert:
  503. that:
  504. - 'ansible_distribution == "{{ os_name }}"'
  505. - 'ansible_distribution_version == "{{ os_version }}"'
  506. success_msg: "{{ check_os_success_msg }}"
  507. fail_msg: "{{ check_os_fail_msg }}"
  508. tags: Check_OS
  509. - name: Set firmware update to true
  510. replace:
  511. path: ../input_params/idrac_vars.yml
  512. regexp: "{{ fw_update_false }}"
  513. replace: "{{ fw_update_true }}"
  514. tags: Set_FW_Update
  515. - name: Replace input parameters folder
  516. copy:
  517. src: "{{ item }}"
  518. dest: "{{ input_params_folder }}"
  519. force: yes
  520. mode: '0644'
  521. with_items:
  522. - "{{ input_files_tc01 }}"
  523. tags: Replace_input
  524. - block:
  525. - name: Execute control_plane.yml playbook
  526. command: ansible-playbook control_plane.yml
  527. args:
  528. chdir: "{{ control_plane_dir }}"
  529. tags: Execute_control_plane
  530. - block:
  531. - name: Execute default validation script
  532. include_tasks: "{{ control_plane_validation_script_path }}"
  533. tags: Execute_Validation_Script
  534. - name: Check if firmware updates folder exists
  535. stat:
  536. path: /var/nfs_repo/dellupdates
  537. register: fw_update_dir
  538. tags: Set_FW_Update
  539. - name: Verify firmware updates were downloaded
  540. assert:
  541. that:
  542. - fw_update_dir.stat.exists
  543. success_msg: "{{ fw_success_validation }}"
  544. fail_msg: "{{ fw_fail_validation }}"
  545. tags: Set_FW_Update
  546. # Testcase OMNIA_1.1_MS_TC_013
  547. # Test Case to validate the execution of control_plane.yml with docker login credential
  548. - name: OMNIA_1.1_MS_TC_013
  549. hosts: localhost
  550. connection: local
  551. vars_files:
  552. - ../roles/control_plane_common/vars/main.yml
  553. - test_vars/test_control_plane_vars.yml
  554. gather_subset:
  555. - 'min'
  556. tags: TC_013
  557. tasks:
  558. - name: Check OS Version
  559. assert:
  560. that:
  561. - 'ansible_distribution == "{{ os_name }}"'
  562. - 'ansible_distribution_version == "{{ os_version }}"'
  563. success_msg: "{{ check_os_success_msg }}"
  564. fail_msg: "{{ check_os_fail_msg }}"
  565. tags: Check_OS
  566. - name: Replace input parameters folder
  567. copy:
  568. src: "{{ item }}"
  569. dest: "{{ input_params_folder }}"
  570. force: yes
  571. mode: '0644'
  572. with_items:
  573. - "{{ input_files_tc01 }}"
  574. tags: Replace_input
  575. - name: Change docker params in omnia_config.yml
  576. replace:
  577. path: ../../omnia_config.yml
  578. regexp: "docker_username: .*$"
  579. replace: 'docker_username: "{{ docker_user }}"'
  580. tags: Set_Docker_Creds
  581. - name: Assert if the credentials are valid in test_control_plane_vars.yml
  582. assert:
  583. that:
  584. - 'docker_user != "User"'
  585. - 'docker_password != "Password"'
  586. success_msg: "{{ valid_docker_creds }}"
  587. fail_msg: "{{ invalid_docker_creds }}"
  588. tags: Set_Docker_Creds
  589. - name: Change docker params in omnia_config.yml
  590. replace:
  591. path: ../../omnia_config.yml
  592. regexp: "docker_password: .*$"
  593. replace: 'docker_password: "{{ docker_password }}"'
  594. tags: Set_Docker_Creds
  595. - block:
  596. - name: Execute control_plane.yml playbook
  597. command: ansible-playbook control_plane.yml
  598. args:
  599. chdir: "{{ control_plane_dir }}"
  600. tags: Execute_control_plane
  601. - block:
  602. - name: Execute default validation script
  603. include_tasks: "{{ control_plane_validation_script_path }}"
  604. tags: Execute_Validation_Script
  605. - name: Fetch docker info
  606. shell: docker login & sleep 3
  607. register: new
  608. changed_when: false
  609. tags: Set_Docker_Creds
  610. - name: Assert that docker was used to pull images
  611. assert:
  612. that:
  613. - "'Login did not succeed' in new.stderr"
  614. success_msg: "{{ docker_success_validation }}"
  615. fail_msg: "{{ docker_fail_validation }}"
  616. tags: Set_Docker_Creds