-
-
Save sbeliakou/14aa1f98902b0558f4f44e0be024c5b6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Cloning into 'arseni_semeniaka'... | |
name: arseni_semeniaka, master/01fb2ff @ 2021-03-13 11:45:31 +0000 | |
2021/03/13 22:37:02 config: tests/encryption.yml | |
2021/03/13 22:37:02 verbosity: 2 | |
2021/03/13 22:37:02 ----------------------------------------------------------------------------------- | |
2021/03/13 22:37:02 Running '2.1 Working with Secrets', 1..8 tests | |
2021/03/13 22:37:02 ----------------------------------------------------------------------------------- | |
2021/03/13 22:37:02 ✓ [2.1 Working with Secrets] => 'spoiler1' decrypted correctly (1), 11ms | |
2021/03/13 22:37:02 ✓ [2.1 Working with Secrets] => 'spoiler2' decrypted correctly (1), 9ms | |
2021/03/13 22:37:02 ✓ [2.1 Working with Secrets] => 'spoiler3' decrypted correctly (1), 9ms | |
2021/03/13 22:37:02 ✓ [2.1 Working with Secrets] => 'spoiler4' decrypted correctly (1), 9ms | |
2021/03/13 22:37:03 ✗ [2.1 Working with Secrets] -> 'secret1' encrypted with tag=dev (v1.2/AES256) | |
2021/03/13 22:37:03 Result: exit status 1 | |
2021/03/13 22:37:03 Output: | |
"$ANSIBLE_VAULT;1.2;AES256;dev\n36376362623865333836373563303039636263396439643235646238313865366364303166363831\n6565643237653365656435616337356638643961393733350a646232633330376231343331343033\n32636466336561373461616230623961343866626662623465633731656132653864373736363138\n3661633361313765310a363666323439356532613033623133623335623239623039366339393832\n6133\n" | |
2021/03/13 22:37:03 ✗ [2.1 Working with Secrets] -> 'secret2' encrypted with tag=test (v1.2/AES256) | |
2021/03/13 22:37:03 Result: exit status 1 | |
2021/03/13 22:37:03 Output: | |
"$ANSIBLE_VAULT;1.2;AES256;test\n37323539663461633032336564383831373330623963623637313130343437313532353762303330\n3930616532323530363831346366636133613463376537620a303632333461633932366432663230\n37326564363665396365636366376131383464393630366666316266323830333139633532363763\n3835316362363632660a633432333135663631613762323531653165353963656433396364356434\n3266\n" | |
2021/03/13 22:37:03 ✗ [2.1 Working with Secrets] -> 'secret3' encrypted with tag=stage (v1.2/AES256) | |
2021/03/13 22:37:03 Result: exit status 1 | |
2021/03/13 22:37:03 Output: | |
"$ANSIBLE_VAULT;1.2;AES256;stage\n39663063616331616636366132623961363637323237666237656563363937393437656431626163\n6137356466396333353833633364626334383138323735340a333236353736383063323031323861\n66363231613334363337386265313633303366343263316164353661383232376439366664333365\n6665363764333565310a316266633964613037616136613837323464316263313663623762386531\n34363833336464623330663362636162356434303033633663393433343163653864\n" | |
2021/03/13 22:37:03 ✗ [2.1 Working with Secrets] -> 'secret4' encrypted with tag=prod (v1.2/AES256) | |
2021/03/13 22:37:03 Result: exit status 1 | |
2021/03/13 22:37:03 Output: | |
"$ANSIBLE_VAULT;1.2;AES256;prod\n37353664306562333062323731393132643631613038316232363965616638623234663533333530\n3832346434373737613864666463646136616332643033620a353131303133643365653738643733\n30346539306564663030343239623638623430623632363633336562356431656239343364613833\n6535663364653832320a643933633135373232666335386435336631636333333566356139633730\n35663062633234393761623732326338383930373262663061396161623663366330\n" | |
2021/03/13 22:37:03 ----------------------------------------------------------------------------------- | |
2021/03/13 22:37:03 Tests Summary: | |
2021/03/13 22:37:03 4 (of 8) tests passed, 4 tests failed; rated as 50.00% | |
2021/03/13 22:37:03 | |
2021/03/13 22:37:03 Time Spent: 1.074s | |
2021/03/13 22:37:03 ----------------------------------------------------------------------------------- | |
name: arseni_semeniaka, master/01fb2ff @ 2021-03-13 11:45:31 +0000 | |
2021/03/13 22:37:03 config: tests/role-deps.yml | |
2021/03/13 22:37:03 verbosity: 2 | |
2021/03/13 22:37:03 ----------------------------------------------------------------------------------- | |
2021/03/13 22:37:03 Running '2.2 Role Dependencies', 1..17 tests | |
2021/03/13 22:37:03 ----------------------------------------------------------------------------------- | |
2021/03/13 22:37:06 ✓ [2.2 Role Dependencies] => 'base' linter (1), 2.365s | |
2021/03/13 22:37:08 ✓ [2.2 Role Dependencies] => 'java' linter (1), 2.448s | |
2021/03/13 22:37:11 ✓ [2.2 Role Dependencies] => 'tomcat' linter (1), 2.591s | |
2021/03/13 22:37:13 ✓ [2.2 Role Dependencies] => 'nginx-base' linter (1), 2.362s | |
2021/03/13 22:37:16 ✓ [2.2 Role Dependencies] => 'nginx-custom' linter (1), 2.45s | |
2021/03/13 22:37:18 ✓ [2.2 Role Dependencies] => 'user' linter (1), 2.679s | |
2021/03/13 22:37:18 ✓ [2.2 Role Dependencies] => 'tomcat' role depends on 'java' role (1), 11ms | |
2021/03/13 22:37:18 ✓ [2.2 Role Dependencies] => 'tomcat' role calls 'java' role with 'java_version' parameter (1), 9ms | |
2021/03/13 22:37:18 ✓ [2.2 Role Dependencies] => 'tomcat' role depends on 'user' role (1), 10ms | |
2021/03/13 22:37:18 ✓ [2.2 Role Dependencies] => 'tomcat' role calls 'user' role with 'user_name' parameter (1), 9ms | |
2021/03/13 22:37:18 ✓ [2.2 Role Dependencies] => 'tomcat' role calls 'user' role with 'user_id' parameter (1), 10ms | |
2021/03/13 22:37:18 ✓ [2.2 Role Dependencies] => 'tomcat' role calls 'user' role with 'group_id' parameter (1), 9ms | |
2021/03/13 22:37:18 ✓ [2.2 Role Dependencies] => 'tomcat' role calls 'user' role with 'user_home' parameter (1), 10ms | |
2021/03/13 22:37:18 ✓ [2.2 Role Dependencies] => 'tomcat' role depends on 'base' role (1), 9ms | |
2021/03/13 22:37:18 ✓ [2.2 Role Dependencies] => 'java' role depends on 'base' role (1), 10ms | |
2021/03/13 22:37:18 ✓ [2.2 Role Dependencies] => 'nginx-base' role depends on 'base' role (1), 8ms | |
2021/03/13 22:37:18 ✓ [2.2 Role Dependencies] => 'nginx-custom' role depends on 'nginx-base' role (1), 10ms | |
2021/03/13 22:37:18 ----------------------------------------------------------------------------------- | |
2021/03/13 22:37:18 Tests Summary: | |
2021/03/13 22:37:18 17 (of 17) tests passed, 0 tests failed; rated as 100.00% | |
2021/03/13 22:37:18 | |
2021/03/13 22:37:18 Time Spent: 15.007s | |
2021/03/13 22:37:18 ----------------------------------------------------------------------------------- | |
name: arseni_semeniaka, master/01fb2ff @ 2021-03-13 11:45:31 +0000 | |
2021/03/13 22:37:18 config: tests/base.yml | |
2021/03/13 22:37:18 verbosity: 2 | |
2021/03/13 22:37:18 ----------------------------------------------------------------------------------- | |
2021/03/13 22:37:18 Running '2.3 Base Role (centos 7)', 1..11 tests | |
2021/03/13 22:37:18 ----------------------------------------------------------------------------------- | |
2021/03/13 22:37:26 ✓ [2.3 Base Role (centos 7)] => Role Linter (1), 5.203s | |
2021/03/13 22:37:27 ✓ [2.3 Base Role (centos 7)] => playbook syntax check (1), 1.167s | |
2021/03/13 22:37:47 ✓ [2.3 Base Role (centos 7)] => apply role (5), 19.834s | |
2021/03/13 22:37:55 ✓ [2.3 Base Role (centos 7)] => idempotence check (apply the role twice) (5), 7.703s | |
2021/03/13 22:37:55 ✓ [2.3 Base Role (centos 7)] => role installs 'epel' repo (1), 8ms | |
2021/03/13 22:37:55 ✓ [2.3 Base Role (centos 7)] => role installs 'curl' package (1), 10ms | |
2021/03/13 22:37:55 ✓ [2.3 Base Role (centos 7)] => role installs 'wget' package (1), 8ms | |
2021/03/13 22:37:55 ✓ [2.3 Base Role (centos 7)] => role installs 'sudo' package (1), 10ms | |
2021/03/13 22:37:55 ✓ [2.3 Base Role (centos 7)] => role installs 'iproute' package (1), 8ms | |
2021/03/13 22:37:55 ✓ [2.3 Base Role (centos 7)] => role installs 'python-pip' package (1), 10ms | |
2021/03/13 22:37:55 ✓ [2.3 Base Role (centos 7)] => role creates ansible facts folder (1), 206ms | |
2021/03/13 22:37:56 ----------------------------------------------------------------------------------- | |
2021/03/13 22:37:56 Tests Summary: | |
2021/03/13 22:37:56 11 (of 11) tests passed, 0 tests failed; rated as 100.00% | |
2021/03/13 22:37:56 | |
2021/03/13 22:37:56 Time Spent: 37.524s | |
2021/03/13 22:37:56 ----------------------------------------------------------------------------------- | |
name: arseni_semeniaka, master/01fb2ff @ 2021-03-13 11:45:31 +0000 | |
2021/03/13 22:37:56 config: tests/user.yml | |
2021/03/13 22:37:56 verbosity: 2 | |
2021/03/13 22:37:56 ----------------------------------------------------------------------------------- | |
2021/03/13 22:37:56 Running '2.3 User Role (CentOS 7)', 1..17 tests | |
2021/03/13 22:37:56 ----------------------------------------------------------------------------------- | |
2021/03/13 22:38:04 ✗ [2.3 User Role (CentOS 7)] -> Role Linter | |
2021/03/13 22:38:04 Result: exit status 2 | |
2021/03/13 22:38:04 Output: | |
Added ANSIBLE_ROLES_PATH=~/.ansible/roles:/usr/share/ansible/roles:/etc/ansible/roles:roles | |
WARNING Listing 1 violation(s) that are fatal | |
var-spacing: Variables should have spaces before and after: {{user_name}} {{user_sudo_privs}} | |
roles/user/tasks/main.yml:27 Task/Handler: Add sudo privileges | |
You can skip specific rules or tags by adding them to your configuration file: | |
# .ansible-lint | |
warn_list: # or 'skip_list' to silence them completely | |
- var-spacing # Variables should have spaces before and after: {{ var_name }} | |
Finished with [1;34m1 failure(s), [1;34m0 warning(s) on [1;34m2 files. | |
2021/03/13 22:38:05 ✓ [2.3 User Role (CentOS 7)] => playbook syntax check (1), 1.268s | |
2021/03/13 22:38:36 ✓ [2.3 User Role (CentOS 7)] => apply role (5), 28.851s | |
2021/03/13 22:38:53 ✓ [2.3 User Role (CentOS 7)] => idempotence check (apply role twice) (5), 16.649s | |
2021/03/13 22:38:53 ✓ [2.3 User Role (CentOS 7)] => use "user_name" varaible (1), 255ms | |
2021/03/13 22:38:53 ✓ [2.3 User Role (CentOS 7)] => use "user_name", "user_group" variables (1), 167ms | |
2021/03/13 22:38:53 ✓ [2.3 User Role (CentOS 7)] => use "user_name", "user_id", "user_group" variables (1), 145ms | |
2021/03/13 22:38:53 ✓ [2.3 User Role (CentOS 7)] => use "user_name", "user_id", "user_group", "user_gid" variables (1), 148ms | |
2021/03/13 22:38:54 ✓ [2.3 User Role (CentOS 7)] => use "user_home" variable (1), 152ms | |
2021/03/13 22:38:54 ✓ [2.3 User Role (CentOS 7)] => set correct home permissions (1), 202ms | |
2021/03/13 22:38:54 ✓ [2.3 User Role (CentOS 7)] => user owns its home directory (1), 170ms | |
2021/03/13 22:38:54 ✓ [2.3 User Role (CentOS 7)] => use "user_name" from play vars (1), 168ms | |
2021/03/13 22:38:54 ✓ [2.3 User Role (CentOS 7)] => doesn't create home dir if required (1), 272ms | |
2021/03/13 22:38:55 ✓ [2.3 User Role (CentOS 7)] => use "user_shell" variable (1), 235ms | |
2021/03/13 22:38:55 ✓ [2.3 User Role (CentOS 7)] => setting custom sudo priviliges (1), 209ms | |
2021/03/13 22:38:55 ✓ [2.3 User Role (CentOS 7)] => doesn't create sudo priviliges for all users (1), 224ms | |
2021/03/13 22:38:55 ✗ [2.3 User Role (CentOS 7)] -> setting custom sudo priviliges - checking validation parameter | |
2021/03/13 22:38:55 Result: exit status 1 | |
2021/03/13 22:38:55 Output: | |
2021/03/13 22:38:57 ----------------------------------------------------------------------------------- | |
2021/03/13 22:38:57 Tests Summary: | |
2021/03/13 22:38:57 15 (of 17) tests passed, 2 tests failed; rated as 92.00% | |
2021/03/13 22:38:57 | |
2021/03/13 22:38:57 Time Spent: 1m1.155s | |
2021/03/13 22:38:57 ----------------------------------------------------------------------------------- | |
name: arseni_semeniaka, master/01fb2ff @ 2021-03-13 11:45:31 +0000 | |
2021/03/13 22:38:57 config: tests/webapp-server.yml | |
2021/03/13 22:38:57 verbosity: 2 | |
2021/03/13 22:38:57 ----------------------------------------------------------------------------------- | |
2021/03/13 22:38:57 Running '2.3 WebApp-Server Role (centos 7)', 1..17 tests | |
2021/03/13 22:38:57 ----------------------------------------------------------------------------------- | |
2021/03/13 22:38:59 ✗ [2.3 WebApp-Server Role (centos 7)] -> role linter | |
2021/03/13 22:38:59 Result: exit status 1 | |
2021/03/13 22:38:59 Output: | |
2021/03/13 22:39:01 ✗ [2.3 WebApp-Server Role (centos 7)] -> playbook syntax check | |
2021/03/13 22:39:01 Result: exit status 4 | |
2021/03/13 22:39:01 Output: | |
[0;34mUsing /tmp/students-2/arseni_semeniaka/day2/2.3/ansible.cfg as config file | |
[0;31mERROR! Empty playbook, nothing to do | |
2021/03/13 22:39:01 ✗ [2.3 WebApp-Server Role (centos 7)] -> apply role | |
2021/03/13 22:39:01 Result: exit status 1 | |
2021/03/13 22:39:01 Output: | |
2021/03/13 22:39:01 ✗ [2.3 WebApp-Server Role (centos 7)] -> idempotence check (apply the role twice) | |
2021/03/13 22:39:01 Result: exit status 1 | |
2021/03/13 22:39:01 Output: | |
2021/03/13 22:39:01 ✗ [2.3 WebApp-Server Role (centos 7)] -> role depends on 'user' role | |
2021/03/13 22:39:01 Result: exit status 2 | |
2021/03/13 22:39:01 Output: | |
grep: roles/webapp-server/meta/main.yml: No such file or directory | |
2021/03/13 22:39:01 ✗ [2.3 WebApp-Server Role (centos 7)] -> passing variables to 'user' role: 'webapp_server_user' | |
2021/03/13 22:39:01 Result: exit status 2 | |
2021/03/13 22:39:01 Output: | |
grep: roles/webapp-server/meta/main.yml: No such file or directory | |
2021/03/13 22:39:01 ✗ [2.3 WebApp-Server Role (centos 7)] -> passing variables to 'user' role: 'webapp_server_group' | |
2021/03/13 22:39:01 Result: exit status 2 | |
2021/03/13 22:39:01 Output: | |
grep: roles/webapp-server/meta/main.yml: No such file or directory | |
2021/03/13 22:39:02 ✗ [2.3 WebApp-Server Role (centos 7)] -> service responds 200 | |
2021/03/13 22:39:02 Result: exit status 7 | |
2021/03/13 22:39:02 Output: | |
* About to connect() to localhost port 8080 (#0) | |
* Trying 127.0.0.1... | |
* Connection refused | |
* Trying ::1... | |
* Failed to connect to ::1: Cannot assign requested address | |
* Failed connect to localhost:8080; Cannot assign requested address | |
* Closing connection 0 | |
2021/03/13 22:39:02 ✗ [2.3 WebApp-Server Role (centos 7)] -> service is enabled | |
2021/03/13 22:39:02 Result: exit status 1 | |
2021/03/13 22:39:02 Output: | |
Failed to get unit file state for webapp-server.service: No such file or directory | |
2021/03/13 22:39:03 ✗ [2.3 WebApp-Server Role (centos 7)] -> service runs under proper user/group | |
2021/03/13 22:39:03 Result: exit status 1 | |
2021/03/13 22:39:03 Output: | |
2021/03/13 22:39:03 ✗ [2.3 WebApp-Server Role (centos 7)] -> application user has no password set | |
2021/03/13 22:39:03 Result: exit status 1 | |
2021/03/13 22:39:03 Output: | |
2021/03/13 22:39:04 ✗ [2.3 WebApp-Server Role (centos 7)] -> stress-test: updating server application | |
2021/03/13 22:39:04 Result: exit status 1 | |
2021/03/13 22:39:04 Output: | |
[0;34mUsing /tmp/students-2/arseni_semeniaka/day2/2.3/ansible.cfg as config file | |
PLAY [all] ********************************************************************* | |
PLAY RECAP ********************************************************************* | |
* About to connect() to localhost port 8080 (#0) | |
* Trying 127.0.0.1... | |
* Connection refused | |
* Trying ::1... | |
* Failed to connect to ::1: Cannot assign requested address | |
* Failed connect to localhost:8080; Cannot assign requested address | |
* Closing connection 0 | |
2021/03/13 22:39:08 ✗ [2.3 WebApp-Server Role (centos 7)] -> stress-test: changing application port | |
2021/03/13 22:39:08 Result: exit status 1 | |
2021/03/13 22:39:08 Output: | |
centos7 | |
fb3b8a48d864cec8051861dc8710158e7a7bf3c20983ba6488feb87b40bf2fab | |
[0;34mUsing /tmp/students-2/arseni_semeniaka/day2/2.3/ansible.cfg as config file | |
PLAY [all] ********************************************************************* | |
PLAY RECAP ********************************************************************* | |
* About to connect() to localhost port 8081 (#0) | |
* Trying 127.0.0.1... | |
* Connection refused | |
* Trying ::1... | |
* Failed to connect to ::1: Cannot assign requested address | |
* Failed connect to localhost:8081; Cannot assign requested address | |
* Closing connection 0 | |
2021/03/13 22:39:12 ✗ [2.3 WebApp-Server Role (centos 7)] -> stress-test: changing student name | |
2021/03/13 22:39:12 Result: exit status 1 | |
2021/03/13 22:39:12 Output: | |
centos7 | |
6a75ea8c95460dd9343020db24c9df979bd210836bfd28dc6e173a8aa443c038 | |
[0;34mUsing /tmp/students-2/arseni_semeniaka/day2/2.3/ansible.cfg as config file | |
PLAY [all] ********************************************************************* | |
PLAY RECAP ********************************************************************* | |
* About to connect() to localhost port 8080 (#0) | |
* Trying 127.0.0.1... | |
* Connection refused | |
* Trying ::1... | |
* Failed to connect to ::1: Cannot assign requested address | |
* Failed connect to localhost:8080; Cannot assign requested address | |
* Closing connection 0 | |
2021/03/13 22:39:16 ✗ [2.3 WebApp-Server Role (centos 7)] -> stress-test: changing application home dir | |
2021/03/13 22:39:16 Result: exit status 1 | |
2021/03/13 22:39:16 Output: | |
centos7 | |
cf844a5193de2c2bdcc6db5e47ab67eec01518ab6f34d7560106a32f8c8c9b4a | |
[0;34mUsing /tmp/students-2/arseni_semeniaka/day2/2.3/ansible.cfg as config file | |
PLAY [all] ********************************************************************* | |
PLAY RECAP ********************************************************************* | |
Unit webapp-server.service could not be found. | |
2021/03/13 22:39:20 ✗ [2.3 WebApp-Server Role (centos 7)] -> rollout (Not ROOT) | |
2021/03/13 22:39:20 Result: exit status 7 | |
2021/03/13 22:39:20 Output: | |
centos7 | |
854d526640fff8258c98516955901df4ce62310172caa0c07edba9637db92cf8 | |
[0;34mUsing /tmp/students-2/arseni_semeniaka/day2/2.3/ansible.cfg as config file | |
PLAY [all] ********************************************************************* | |
PLAY RECAP ********************************************************************* | |
* About to connect() to localhost port 8080 (#0) | |
* Trying 127.0.0.1... | |
* Connection refused | |
* Trying ::1... | |
* Failed to connect to ::1: Cannot assign requested address | |
* Failed connect to localhost:8080; Cannot assign requested address | |
* Closing connection 0 | |
2021/03/13 22:39:22 ✗ [2.3 WebApp-Server Role (centos 7)] -> idempotancy check (Not ROOT) | |
2021/03/13 22:39:22 Result: exit status 1 | |
2021/03/13 22:39:22 Output: | |
(run, /tmp/students-2/arseni_semeniaka/day2/2.3) => ansible-playbook testing-role-webapp-server.yml -i default, -e ansible_host=centos7 -v -u devops | |
rc: 0 | |
output: | | |
[0;34mUsing /tmp/students-2/arseni_semeniaka/day2/2.3/ansible.cfg as config file | |
PLAY [all] ********************************************************************* | |
PLAY RECAP ********************************************************************* | |
Stdout Assertion Failed (Partial, 'unreachable=0') | |
2021/03/13 22:39:23 ----------------------------------------------------------------------------------- | |
2021/03/13 22:39:23 Tests Summary: | |
2021/03/13 22:39:23 0 (of 17) tests passed, 17 tests failed; rated as 0.00% | |
2021/03/13 22:39:23 | |
2021/03/13 22:39:23 Time Spent: 25.664s | |
2021/03/13 22:39:23 ----------------------------------------------------------------------------------- | |
name: arseni_semeniaka, master/01fb2ff @ 2021-03-13 11:45:31 +0000 | |
2021/03/13 22:39:23 config: tests/mysqldb.yml | |
2021/03/13 22:39:23 verbosity: 2 | |
2021/03/13 22:39:23 ----------------------------------------------------------------------------------- | |
2021/03/13 22:39:23 Running '2.3 MysqlDB Role (CentOS 7)', 1..17 tests | |
2021/03/13 22:39:23 ----------------------------------------------------------------------------------- | |
2021/03/13 22:39:27 ✗ [2.3 MysqlDB Role (CentOS 7)] -> 'mysql_db' role linter | |
2021/03/13 22:39:27 Result: exit status 2 | |
2021/03/13 22:39:27 Output: | |
Added ANSIBLE_ROLES_PATH=~/.ansible/roles:/usr/share/ansible/roles:/etc/ansible/roles:roles | |
WARNING Listing 1 violation(s) that are fatal | |
command-instead-of-shell: Use shell only when shell functionality is required | |
roles/mysql_db/tasks/main.yml:19 Task/Handler: Initialize data directory | |
You can skip specific rules or tags by adding them to your configuration file: | |
# .ansible-lint | |
warn_list: # or 'skip_list' to silence them completely | |
- command-instead-of-shell # Use shell only when shell functionality is required | |
Finished with [1;34m1 failure(s), [1;34m0 warning(s) on [1;34m3 files. | |
2021/03/13 22:39:27 ✗ [2.3 MysqlDB Role (CentOS 7)] -> 'mysql_db_user' role linter | |
2021/03/13 22:39:27 Result: exit status 1 | |
2021/03/13 22:39:27 Output: | |
2021/03/13 22:39:28 ✓ [2.3 MysqlDB Role (CentOS 7)] => playbook syntax check (1), 1.169s | |
2021/03/13 22:42:34 ✗ [2.3 MysqlDB Role (CentOS 7)] -> running role-mysqldb.yml playbook | |
2021/03/13 22:42:34 Result: exit status 2 | |
2021/03/13 22:42:34 Output: | |
Error: No such container: db | |
b470654226ba72c3f3ff54b2855f01d87d0e3e5210017ac5cb18aa1f463ec06e | |
[0;34mUsing /tmp/students-2/arseni_semeniaka/day2/2.3/ansible.cfg as config file | |
PLAY [db] ********************************************************************** | |
TASK [user : Create group] ***************************************************** | |
[0;36mskipping: [db] => {"changed": false, "skip_reason": "Conditional result was False"} | |
TASK [user : Create group] ***************************************************** | |
[0;33mchanged: [db] => {"ansible_facts": {"discovered_interpreter_python": "/usr/bin/python"}, "changed": true, "gid": 1001, "name": "mysql", "state": "present", "system": false} | |
TASK [user : Create user] ****************************************************** | |
[0;33mchanged: [db] => {"ansible_facts": {}, "changed": true, "comment": "", "create_home": true, "group": 1001, "home": "/var/lib/mysql", "name": "mysql", "shell": "/bin/false", "state": "present", "system": false, "uid": 1001} | |
TASK [user : Add sudo privileges] ********************************************** | |
[0;36mskipping: [db] => {"changed": false, "skip_reason": "Conditional result was False"} | |
TASK [mysql_db : Install repo] ************************************************* | |
[0;33mchanged: [db] => {"ansible_facts": {}, "changed": true, "changes": {"installed": ["/root/.ansible/tmp/ansible-moduletmp-1615675182.25-0Qq8u4/mysql80-community-release-el7-3.noarch9Mmkqq.rpm"]}, "msg": "", "rc": 0, "results": ["Loaded plugins: fastestmirror, ovl\nExamining /root/.ansible/tmp/ansible-moduletmp-1615675182.25-0Qq8u4/mysql80-community-release-el7-3.noarch9Mmkqq.rpm: mysql80-community-release-el7-3.noarch\nMarking /root/.ansible/tmp/ansible-moduletmp-1615675182.25-0Qq8u4/mysql80-community-release-el7-3.noarch9Mmkqq.rpm to be installed\nResolving Dependencies\n--> Running transaction check\n---> Package mysql80-community-release.noarch 0:el7-3 will be installed\n--> Finished Dependency Resolution\n\nDependencies Resolved\n\n================================================================================\n Package Arch Version\n Repository Size\n================================================================================\nInstalling:\n mysql80-community-release\n noarch el7-3 /mysql80-community-release-el7-3.noarch9Mmkqq 31 k\n\nTransaction Summary\n================================================================================\nInstall 1 Package\n\nTotal size: 31 k\nInstalled size: 31 k\nDownloading packages:\nRunning transaction check\nRunning transaction test\nTransaction test succeeded\nRunning transaction\n Installing : mysql80-community-release-el7-3.noarch 1/1 \n Verifying : mysql80-community-release-el7-3.noarch 1/1 \n\nInstalled:\n mysql80-community-release.noarch 0:el7-3 \n\nComplete!\n"]} | |
TASK [mysql_db : Install PyMySQL] ********************************************** | |
[0;33mchanged: [db] => {"ansible_facts": {}, "changed": true, "changes": {"installed": ["python2-PyMySQL"]}, "msg": "", "rc": 0, "results": ["Loaded plugins: fastestmirror, ovl\nLoading mirror speeds from cached hostfile\n * base: ftp.byfly.by\n * epel: mirror.datacenter.by\n * extras: ftp.byfly.by\n * updates: ftp.byfly.by\nResolving Dependencies\n--> Running transaction check\n---> Package python2-PyMySQL.noarch 0:0.9.3-1.el7 will be installed\n--> Finished Dependency Resolution\n\nDependencies Resolved\n\n================================================================================\n Package Arch Version Repository Size\n================================================================================\nInstalling:\n python2-PyMySQL noarch 0.9.3-1.el7 epel 91 k\n\nTransaction Summary\n================================================================================\nInstall 1 Package\n\nTotal download size: 91 k\nInstalled size: 372 k\nDownloading packages:\nRunning transaction check\nRunning transaction test\nTransaction test succeeded\nRunning transaction\n Installing : python2-PyMySQL-0.9.3-1.el7.noarch 1/1 \n Verifying : python2-PyMySQL-0.9.3-1.el7.noarch 1/1 \n\nInstalled:\n python2-PyMySQL.noarch 0:0.9.3-1.el7 \n\nComplete!\n"]} | |
TASK [mysql_db : Install mysql] ************************************************ | |
[0;33mchanged: [db] => {"ansible_facts": {}, "changed": true, "changes": {"installed": ["mysql-community-server"]}, "msg": "warning: /var/cache/yum/x86_64/7/mysql80-community/packages/mysql-community-client-plugins-8.0.23-1.el7.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID 5072e1f5: NOKEY\nImporting GPG key 0x5072E1F5:\n Userid : \"MySQL Release Engineering <[email protected]>\"\n Fingerprint: a4a9 4068 76fc bd3c 4567 70c8 8c71 8d3b 5072 e1f5\n Package : mysql80-community-release-el7-3.noarch (installed)\n From : /etc/pki/rpm-gpg/RPM-GPG-KEY-mysql\n", "rc": 0, "results": ["Loaded plugins: fastestmirror, ovl\nLoading mirror speeds from cached hostfile\n * base: ftp.byfly.by\n * epel: mirror.datacenter.by\n * extras: ftp.byfly.by\n * updates: ftp.byfly.by\nResolving Dependencies\n--> Running transaction check\n---> Package mysql-community-server.x86_64 0:8.0.23-1.el7 will be installed\n--> Processing Dependency: mysql-community-common(x86-64) = 8.0.23-1.el7 for package: mysql-community-server-8.0.23-1.el7.x86_64\n--> Processing Dependency: mysql-community-client(x86-64) >= 8.0.11 for package: mysql-community-server-8.0.23-1.el7.x86_64\n--> Processing Dependency: libaio.so.1(LIBAIO_0.1)(64bit) for package: mysql-community-server-8.0.23-1.el7.x86_64\n--> Processing Dependency: libaio.so.1(LIBAIO_0.4)(64bit) for package: mysql-community-server-8.0.23-1.el7.x86_64\n--> Processing Dependency: libnuma.so.1(libnuma_1.1)(64bit) for package: mysql-community-server-8.0.23-1.el7.x86_64\n--> Processing Dependency: libnuma.so.1(libnuma_1.2)(64bit) for package: mysql-community-server-8.0.23-1.el7.x86_64\n--> Processing Dependency: libaio.so.1()(64bit) for package: mysql-community-server-8.0.23-1.el7.x86_64\n--> Processing Dependency: libnuma.so.1()(64bit) for package: mysql-community-server-8.0.23-1.el7.x86_64\n--> Running transaction check\n---> Package libaio.x86_64 0:0.3.109-13.el7 will be installed\n---> Package mysql-community-client.x86_64 0:8.0.23-1.el7 will be installed\n--> Processing Dependency: mysql-community-client-plugins = 8.0.23-1.el7 for package: mysql-community-client-8.0.23-1.el7.x86_64\n--> Processing Dependency: mysql-community-libs(x86-64) >= 8.0.11 for package: mysql-community-client-8.0.23-1.el7.x86_64\n---> Package mysql-community-common.x86_64 0:8.0.23-1.el7 will be installed\n---> Package numactl-libs.x86_64 0:2.0.12-5.el7 will be installed\n--> Running transaction check\n---> Package mysql-community-client-plugins.x86_64 0:8.0.23-1.el7 will be installed\n---> Package mysql-community-libs.x86_64 0:8.0.23-1.el7 will be installed\n--> Finished Dependency Resolution\n\nDependencies Resolved\n\n================================================================================\n Package Arch Version Repository Size\n================================================================================\nInstalling:\n mysql-community-server x86_64 8.0.23-1.el7 mysql80-community 518 M\nInstalling for dependencies:\n libaio x86_64 0.3.109-13.el7 base 24 k\n mysql-community-client x86_64 8.0.23-1.el7 mysql80-community 48 M\n mysql-community-client-plugins x86_64 8.0.23-1.el7 mysql80-community 237 k\n mysql-community-common x86_64 8.0.23-1.el7 mysql80-community 621 k\n mysql-community-libs x86_64 8.0.23-1.el7 mysql80-community 4.6 M\n numactl-libs x86_64 2.0.12-5.el7 base 30 k\n\nTransaction Summary\n================================================================================\nInstall 1 Package (+6 Dependent packages)\n\nTotal download size: 572 M\nInstalled size: 2.6 G\nDownloading packages:\nPublic key for mysql-community-client-plugins-8.0.23-1.el7.x86_64.rpm is not installed\n--------------------------------------------------------------------------------\nTotal 64 MB/s | 572 MB 00:08 \nRetrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql\nRunning transaction check\nRunning transaction test\nTransaction test succeeded\nRunning transaction\n Installing : mysql-community-common-8.0.23-1.el7.x86_64 1/7 \n Installing : mysql-community-client-plugins-8.0.23-1.el7.x86_64 2/7 \n Installing : mysql-community-libs-8.0.23-1.el7.x86_64 3/7 \n Installing : mysql-community-client-8.0.23-1.el7.x86_64 4/7 \n Installing : libaio-0.3.109-13.el7.x86_64 5/7 \n Installing : numactl-libs-2.0.12-5.el7.x86_64 6/7 \n Installing : mysql-community-server-8.0.23-1.el7.x86_64 7/7 \n Verifying : mysql-community-client-8.0.23-1.el7.x86_64 1/7 \n Verifying : numactl-libs-2.0.12-5.el7.x86_64 2/7 \n Verifying : mysql-community-libs-8.0.23-1.el7.x86_64 3/7 \n Verifying : mysql-community-client-plugins-8.0.23-1.el7.x86_64 4/7 \n Verifying : mysql-community-server-8.0.23-1.el7.x86_64 5/7 \n Verifying : libaio-0.3.109-13.el7.x86_64 6/7 \n Verifying : mysql-community-common-8.0.23-1.el7.x86_64 7/7 \n\nInstalled:\n mysql-community-server.x86_64 0:8.0.23-1.el7 \n\nDependency Installed:\n libaio.x86_64 0:0.3.109-13.el7 \n mysql-community-client.x86_64 0:8.0.23-1.el7 \n mysql-community-client-plugins.x86_64 0:8.0.23-1.el7 \n mysql-community-common.x86_64 0:8.0.23-1.el7 \n mysql-community-libs.x86_64 0:8.0.23-1.el7 \n numactl-libs.x86_64 0:2.0.12-5.el7 \n\nComplete!\n"]} | |
TASK [mysql_db : Initialize data directory] ************************************ | |
[0;32mok: [db] => {"ansible_facts": {}, "changed": false, "cmd": "mysqld --initialize-insecure --user=mysql", "delta": "0:00:09.143976", "end": "2021-03-13 22:42:30.572334", "failed_when_result": false, "rc": 0, "start": "2021-03-13 22:42:21.428358", "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []} | |
TASK [mysql_db : Start mysqld] ************************************************* | |
[0;33mchanged: [db] => {"ansible_facts": {}, "changed": true, "enabled": true, "name": "mysqld", "state": "started", "status": {"ActiveEnterTimestampMonotonic": "0", "ActiveExitTimestampMonotonic": "0", "ActiveState": "inactive", "After": "syslog.target systemd-journald.socket basic.target network.target system.slice", "AllowIsolate": "no", "AmbientCapabilities": "0", "AssertResult": "no", "AssertTimestampMonotonic": "0", "Before": "multi-user.target shutdown.target", "BlockIOAccounting": "no", "BlockIOWeight": "18446744073709551615", "CPUAccounting": "no", "CPUQuotaPerSecUSec": "infinity", "CPUSchedulingPolicy": "0", "CPUSchedulingPriority": "0", "CPUSchedulingResetOnFork": "no", "CPUShares": "18446744073709551615", "CanIsolate": "no", "CanReload": "no", "CanStart": "yes", "CanStop": "yes", "CapabilityBoundingSet": "18446744073709551615", "ConditionResult": "no", "ConditionTimestampMonotonic": "0", "Conflicts": "shutdown.target", "ControlPID": "0", "DefaultDependencies": "yes", "Delegate": "no", "Description": "MySQL Server", "DevicePolicy": "auto", "Documentation": "man:mysqld(8) http://dev.mysql.com/doc/refman/en/using-systemd.html", "Environment": "MYSQLD_PARENT_PID=1", "EnvironmentFile": "/etc/sysconfig/mysql (ignore_errors=yes)", "ExecMainCode": "0", "ExecMainExitTimestampMonotonic": "0", "ExecMainPID": "0", "ExecMainStartTimestampMonotonic": "0", "ExecMainStatus": "0", "ExecStart": "{ path=/usr/sbin/mysqld ; argv[]=/usr/sbin/mysqld $MYSQLD_OPTS ; ignore_errors=no ; start_time=[n/a] ; stop_time=[n/a] ; pid=0 ; code=(null) ; status=0/0 }", "ExecStartPre": "{ path=/usr/bin/mysqld_pre_systemd ; argv[]=/usr/bin/mysqld_pre_systemd ; ignore_errors=no ; start_time=[n/a] ; stop_time=[n/a] ; pid=0 ; code=(null) ; status=0/0 }", "FailureAction": "none", "FileDescriptorStoreMax": "0", "FragmentPath": "/usr/lib/systemd/system/mysqld.service", "Group": "mysql", "GuessMainPID": "yes", "IOScheduling": "0", "Id": "mysqld.service", "IgnoreOnIsolate": "no", "IgnoreOnSnapshot": "no", "IgnoreSIGPIPE": "yes", "InactiveEnterTimestampMonotonic": "0", "InactiveExitTimestampMonotonic": "0", "JobTimeoutAction": "none", "JobTimeoutUSec": "0", "KillMode": "control-group", "KillSignal": "15", "LimitAS": "18446744073709551615", "LimitCORE": "18446744073709551615", "LimitCPU": "18446744073709551615", "LimitDATA": "18446744073709551615", "LimitFSIZE": "18446744073709551615", "LimitLOCKS": "18446744073709551615", "LimitMEMLOCK": "67108864", "LimitMSGQUEUE": "819200", "LimitNICE": "0", "LimitNOFILE": "10000", "LimitNPROC": "18446744073709551615", "LimitRSS": "18446744073709551615", "LimitRTPRIO": "0", "LimitRTTIME": "18446744073709551615", "LimitSIGPENDING": "29790", "LimitSTACK": "18446744073709551615", "LoadState": "loaded", "MainPID": "0", "MemoryAccounting": "no", "MemoryCurrent": "18446744073709551615", "MemoryLimit": "18446744073709551615", "MountFlags": "0", "Names": "mysqld.service", "NeedDaemonReload": "no", "Nice": "0", "NoNewPrivileges": "no", "NonBlocking": "no", "NotifyAccess": "main", "OOMScoreAdjust": "0", "OnFailureJobMode": "replace", "PermissionsStartOnly": "yes", "PrivateDevices": "no", "PrivateNetwork": "no", "PrivateTmp": "no", "ProtectHome": "no", "ProtectSystem": "no", "RefuseManualStart": "no", "RefuseManualStop": "no", "RemainAfterExit": "no", "Requires": "basic.target", "Restart": "on-failure", "RestartUSec": "100ms", "Result": "success", "RootDirectoryStartOnly": "no", "RuntimeDirectoryMode": "0755", "SameProcessGroup": "no", "SecureBits": "0", "SendSIGHUP": "no", "SendSIGKILL": "yes", "Slice": "system.slice", "StandardError": "inherit", "StandardInput": "null", "StandardOutput": "journal", "StartLimitAction": "none", "StartLimitBurst": "5", "StartLimitInterval": "10000000", "StartupBlockIOWeight": "18446744073709551615", "StartupCPUShares": "18446744073709551615", "StatusErrno": "0", "StopWhenUnneeded": "no", "SubState": "dead", "SyslogLevelPrefix": "yes", "SyslogPriority": "30", "SystemCallErrorNumber": "0", "TTYReset": "no", "TTYVHangup": "no", "TTYVTDisallocate": "no", "TasksAccounting": "no", "TasksCurrent": "18446744073709551615", "TasksMax": "18446744073709551615", "TimeoutStartUSec": "0", "TimeoutStopUSec": "0", "TimerSlackNSec": "50000", "Transient": "no", "Type": "notify", "UMask": "0022", "UnitFilePreset": "disabled", "UnitFileState": "enabled", "User": "mysql", "WantedBy": "multi-user.target", "Wants": "system.slice", "WatchdogTimestampMonotonic": "0", "WatchdogUSec": "0"}} | |
TASK [mysql_db : Set MySQL root Password] ************************************** | |
[0;31mfatal: [db]: FAILED! => {"ansible_facts": {}, "changed": false, "msg": "unable to connect to database, check login_user and login_password are correct or /root/.my.cnf has the credentials. Exception message: cryptography is required for sha256_password or caching_sha2_password"} | |
PLAY RECAP ********************************************************************* | |
[0;31mdb : [0;32mok=7 [0;33mchanged=6 unreachable=0 [0;31mfailed=1 [0;36mskipped=2 rescued=0 ignored=0 | |
2021/03/13 22:45:33 ✓ [2.3 MysqlDB Role (CentOS 7)] => apply 'mysql_db' role (1), 2m58.675s | |
2021/03/13 22:45:44 ✗ [2.3 MysqlDB Role (CentOS 7)] -> apply 'mysql_db' role again | |
2021/03/13 22:45:44 Result: exit status 2 | |
2021/03/13 22:45:44 Output: | |
[0;34mUsing /tmp/students-2/arseni_semeniaka/day2/2.3/ansible.cfg as config file | |
PLAY [db] ********************************************************************** | |
TASK [user : Create group name={{ user_group | default(user_name) }}, gid={{ user_gid | default(user_id) }}] *** | |
[0;36mskipping: [db] => {"changed": false, "skip_reason": "Conditional result was False"} | |
TASK [user : Create group name={{ user_group | default(user_name) }}, gid={{ user_gid | default(omit) }}] *** | |
[0;32mok: [db] => {"ansible_facts": {"discovered_interpreter_python": "/usr/bin/python"}, "changed": false, "gid": 1001, "name": "mysql", "state": "present", "system": false} | |
TASK [user : Create user name={{ user_name | mandatory }}, uid={{ user_id | default(omit) }}, group={{ user_group | default(user_name) }}, home={{ user_home | default('/home/' + user_name + '/') }}, create_home={{ user_home_create | default(true) }}, shell={{ user_shell | default('/bin/sh') }}] *** | |
[0;32mok: [db] => {"ansible_facts": {}, "append": false, "changed": false, "comment": "", "group": 1001, "home": "/var/lib/mysql", "move_home": false, "name": "mysql", "shell": "/bin/false", "state": "present", "uid": 1001} | |
TASK [user : Add sudo privileges content={{user_name}} {{user_sudo_privs}}, dest=/etc/sudoers.d/{{ user_name }}, mode=288, validate=visudo -cf %s] *** | |
[0;36mskipping: [db] => {"changed": false, "skip_reason": "Conditional result was False"} | |
TASK [mysql_db : Install repo name=https://repo.mysql.com/mysql80-community-release-el7-3.noarch.rpm, update_cache=true] *** | |
[0;32mok: [db] => {"ansible_facts": {}, "changed": false, "msg": "", "rc": 0, "results": ["mysql80-community-release-el7-3.noarch providing /root/.ansible/tmp/ansible-moduletmp-1615675540.37-yhzjTK/mysql80-community-release-el7-3.noarch_GFMJG.rpm is already installed"]} | |
TASK [mysql_db : Install PyMySQL name=python2-PyMySQL] ************************* | |
[0;32mok: [db] => {"ansible_facts": {}, "changed": false, "msg": "", "rc": 0, "results": ["python2-PyMySQL-0.9.3-1.el7.noarch providing python2-PyMySQL is already installed"]} | |
TASK [mysql_db : Install mysql name=mysql-community-server, enablerepo=mysql80-community, state=present] *** | |
[0;32mok: [db] => {"ansible_facts": {}, "changed": false, "msg": "", "rc": 0, "results": ["mysql-community-server-8.0.23-1.el7.x86_64 providing mysql-community-server is already installed"]} | |
TASK [mysql_db : Initialize data directory _raw_params=mysqld --initialize-insecure --user=mysql] *** | |
[0;32mok: [db] => {"ansible_facts": {}, "changed": false, "cmd": "mysqld --initialize-insecure --user=mysql", "delta": "0:00:00.028168", "end": "2021-03-13 22:45:42.786144", "failed_when_result": false, "msg": "non-zero return code", "rc": 1, "start": "2021-03-13 22:45:42.757976", "stderr": "", "stderr_lines": [], "stdout": "", "stdout_lines": []} | |
TASK [mysql_db : Start mysqld state=started, enabled=True, name=mysqld] ******** | |
[0;32mok: [db] => {"ansible_facts": {}, "changed": false, "enabled": true, "name": "mysqld", "state": "started", "status": {"ActiveEnterTimestamp": "Sat 2021-03-13 22:45:32 UTC", "ActiveEnterTimestampMonotonic": "353425744471", "ActiveExitTimestampMonotonic": "0", "ActiveState": "active", "After": "system.slice network.target basic.target systemd-journald.socket syslog.target", "AllowIsolate": "no", "AmbientCapabilities": "0", "AssertResult": "yes", "AssertTimestamp": "Sat 2021-03-13 22:45:31 UTC", "AssertTimestampMonotonic": "353424538391", "Before": "shutdown.target multi-user.target", "BlockIOAccounting": "no", "BlockIOWeight": "18446744073709551615", "CPUAccounting": "no", "CPUQuotaPerSecUSec": "infinity", "CPUSchedulingPolicy": "0", "CPUSchedulingPriority": "0", "CPUSchedulingResetOnFork": "no", "CPUShares": "18446744073709551615", "CanIsolate": "no", "CanReload": "no", "CanStart": "yes", "CanStop": "yes", "CapabilityBoundingSet": "18446744073709551615", "ConditionResult": "yes", "ConditionTimestamp": "Sat 2021-03-13 22:45:31 UTC", "ConditionTimestampMonotonic": "353424538391", "Conflicts": "shutdown.target", "ControlGroup": "/docker/129faef4dcbf47eee861fa2dd43ef907ffcf80bb26b67f1207ab943f2522073c/system.slice/mysqld.service", "ControlPID": "0", "DefaultDependencies": "yes", "Delegate": "no", "Description": "MySQL Server", "DevicePolicy": "auto", "Documentation": "man:mysqld(8) http://dev.mysql.com/doc/refman/en/using-systemd.html", "Environment": "MYSQLD_PARENT_PID=1", "EnvironmentFile": "/etc/sysconfig/mysql (ignore_errors=yes)", "ExecMainCode": "0", "ExecMainExitTimestampMonotonic": "0", "ExecMainPID": "5423", "ExecMainStartTimestamp": "Sat 2021-03-13 22:45:31 UTC", "ExecMainStartTimestampMonotonic": "353424587663", "ExecMainStatus": "0", "ExecStart": "{ path=/usr/sbin/mysqld ; argv[]=/usr/sbin/mysqld $MYSQLD_OPTS ; ignore_errors=no ; start_time=[Sat 2021-03-13 22:45:31 UTC] ; stop_time=[n/a] ; pid=5423 ; code=(null) ; status=0/0 }", "ExecStartPre": "{ path=/usr/bin/mysqld_pre_systemd ; argv[]=/usr/bin/mysqld_pre_systemd ; ignore_errors=no ; start_time=[Sat 2021-03-13 22:45:31 UTC] ; stop_time=[Sat 2021-03-13 22:45:31 UTC] ; pid=5402 ; code=exited ; status=0 }", "FailureAction": "none", "FileDescriptorStoreMax": "0", "FragmentPath": "/usr/lib/systemd/system/mysqld.service", "Group": "mysql", "GuessMainPID": "yes", "IOScheduling": "0", "Id": "mysqld.service", "IgnoreOnIsolate": "no", "IgnoreOnSnapshot": "no", "IgnoreSIGPIPE": "yes", "InactiveEnterTimestampMonotonic": "0", "InactiveExitTimestamp": "Sat 2021-03-13 22:45:31 UTC", "InactiveExitTimestampMonotonic": "353424539954", "JobTimeoutAction": "none", "JobTimeoutUSec": "0", "KillMode": "control-group", "KillSignal": "15", "LimitAS": "18446744073709551615", "LimitCORE": "18446744073709551615", "LimitCPU": "18446744073709551615", "LimitDATA": "18446744073709551615", "LimitFSIZE": "18446744073709551615", "LimitLOCKS": "18446744073709551615", "LimitMEMLOCK": "67108864", "LimitMSGQUEUE": "819200", "LimitNICE": "0", "LimitNOFILE": "10000", "LimitNPROC": "18446744073709551615", "LimitRSS": "18446744073709551615", "LimitRTPRIO": "0", "LimitRTTIME": "18446744073709551615", "LimitSIGPENDING": "29790", "LimitSTACK": "18446744073709551615", "LoadState": "loaded", "MainPID": "5423", "MemoryAccounting": "no", "MemoryCurrent": "18446744073709551615", "MemoryLimit": "18446744073709551615", "MountFlags": "0", "Names": "mysqld.service", "NeedDaemonReload": "no", "Nice": "0", "NoNewPrivileges": "no", "NonBlocking": "no", "NotifyAccess": "main", "OOMScoreAdjust": "0", "OnFailureJobMode": "replace", "PermissionsStartOnly": "yes", "PrivateDevices": "no", "PrivateNetwork": "no", "PrivateTmp": "no", "ProtectHome": "no", "ProtectSystem": "no", "RefuseManualStart": "no", "RefuseManualStop": "no", "RemainAfterExit": "no", "Requires": "basic.target", "Restart": "on-failure", "RestartUSec": "100ms", "Result": "success", "RootDirectoryStartOnly": "no", "RuntimeDirectoryMode": "0755", "SameProcessGroup": "no", "SecureBits": "0", "SendSIGHUP": "no", "SendSIGKILL": "yes", "Slice": "system.slice", "StandardError": "inherit", "StandardInput": "null", "StandardOutput": "journal", "StartLimitAction": "none", "StartLimitBurst": "5", "StartLimitInterval": "10000000", "StartupBlockIOWeight": "18446744073709551615", "StartupCPUShares": "18446744073709551615", "StatusErrno": "0", "StatusText": "Server is operational", "StopWhenUnneeded": "no", "SubState": "running", "SyslogLevelPrefix": "yes", "SyslogPriority": "30", "SystemCallErrorNumber": "0", "TTYReset": "no", "TTYVHangup": "no", "TTYVTDisallocate": "no", "TasksAccounting": "no", "TasksCurrent": "18446744073709551615", "TasksMax": "18446744073709551615", "TimeoutStartUSec": "0", "TimeoutStopUSec": "0", "TimerSlackNSec": "50000", "Transient": "no", "Type": "notify", "UMask": "0022", "UnitFilePreset": "disabled", "UnitFileState": "enabled", "User": "mysql", "WantedBy": "multi-user.target", "Wants": "system.slice", "WatchdogTimestamp": "Sat 2021-03-13 22:45:32 UTC", "WatchdogTimestampMonotonic": "353425744386", "WatchdogUSec": "0"}} | |
TASK [mysql_db : Set MySQL root Password login_host=localhost, login_user=root, login_password={{ mysqldb_old_root_password | default('') }}, name=root, password={{ mysqldb_root_password | default('root') }}, state=present] *** | |
[0;31mfatal: [db]: FAILED! => {"ansible_facts": {}, "changed": false, "msg": "unable to connect to database, check login_user and login_password are correct or /root/.my.cnf has the credentials. Exception message: (1045, u\"Access denied for user 'root'@'localhost' (using password: NO)\")"} | |
PLAY RECAP ********************************************************************* | |
[0;31mdb : [0;32mok=7 changed=0 unreachable=0 [0;31mfailed=1 [0;36mskipped=2 rescued=0 ignored=0 | |
2021/03/13 22:45:44 ✗ [2.3 MysqlDB Role (CentOS 7)] -> apply 'mysql_db_user' role | |
2021/03/13 22:45:44 Result: exit status 1 | |
2021/03/13 22:45:44 Output: | |
2021/03/13 22:45:44 ✗ [2.3 MysqlDB Role (CentOS 7)] -> apply 'mysql_db_user' role again | |
2021/03/13 22:45:44 Result: exit status 1 | |
2021/03/13 22:45:44 Output: | |
2021/03/13 22:45:44 ✓ [2.3 MysqlDB Role (CentOS 7)] => db service is enabled (1), 160ms | |
2021/03/13 22:45:44 ✓ [2.3 MysqlDB Role (CentOS 7)] => db service is active (1), 139ms | |
2021/03/13 22:45:45 ✓ [2.3 MysqlDB Role (CentOS 7)] => db service is running on 3306 (1), 168ms | |
2021/03/13 22:45:45 ✓ [2.3 MysqlDB Role (CentOS 7)] => db root password set (1), 191ms | |
2021/03/13 22:45:45 ✗ [2.3 MysqlDB Role (CentOS 7)] -> custom db user (non-root) created | |
2021/03/13 22:45:45 Result: exit status 1 | |
2021/03/13 22:45:45 Output: | |
mysqladmin: [Warning] Using a password on the command line interface can be insecure. | |
mysqladmin: connect to server at 'localhost' failed | |
error: 'Access denied for user 'jdoe'@'localhost' (using password: YES)' | |
2021/03/13 22:48:14 ✓ [2.3 MysqlDB Role (CentOS 7)] => apply 'mysql_db' role (Not ROOT) (1), 2m28.834s | |
2021/03/13 22:48:25 ✗ [2.3 MysqlDB Role (CentOS 7)] -> apply 'mysql_db' role (Not ROOT) again | |
2021/03/13 22:48:25 Result: exit status 2 | |
2021/03/13 22:48:25 Output: | |
PLAY [db] ********************************************************************** | |
TASK [user : Create group] ***************************************************** | |
[0;36mskipping: [db] | |
TASK [user : Create group] ***************************************************** | |
[0;32mok: [db] | |
TASK [user : Create user] ****************************************************** | |
[0;32mok: [db] | |
TASK [user : Add sudo privileges] ********************************************** | |
[0;36mskipping: [db] | |
TASK [mysql_db : Install repo] ************************************************* | |
[0;32mok: [db] | |
TASK [mysql_db : Install PyMySQL] ********************************************** | |
[0;32mok: [db] | |
TASK [mysql_db : Install mysql] ************************************************ | |
[0;32mok: [db] | |
TASK [mysql_db : Initialize data directory] ************************************ | |
[0;32mok: [db] | |
TASK [mysql_db : Start mysqld] ************************************************* | |
[0;32mok: [db] | |
TASK [mysql_db : Set MySQL root Password] ************************************** | |
[0;31mfatal: [db]: FAILED! => {"ansible_facts": {}, "changed": false, "msg": "unable to connect to database, check login_user and login_password are correct or /root/.my.cnf has the credentials. Exception message: (1045, u\"Access denied for user 'root'@'localhost' (using password: NO)\")"} | |
PLAY RECAP ********************************************************************* | |
[0;31mdb : [0;32mok=7 changed=0 unreachable=0 [0;31mfailed=1 [0;36mskipped=2 rescued=0 ignored=0 | |
2021/03/13 22:48:26 ✓ [2.3 MysqlDB Role (CentOS 7)] => apply 'mysql_db_user' role (Not ROOT) (1), 1.047s | |
2021/03/13 22:48:27 ✗ [2.3 MysqlDB Role (CentOS 7)] -> apply 'mysql_db_user' role (Not ROOT) again | |
2021/03/13 22:48:27 Result: exit status 1 | |
2021/03/13 22:48:27 Output: | |
PLAY [db] ********************************************************************** | |
PLAY RECAP ********************************************************************* | |
2021/03/13 22:48:28 ----------------------------------------------------------------------------------- | |
2021/03/13 22:48:28 Tests Summary: | |
2021/03/13 22:48:28 8 (of 17) tests passed, 9 tests failed; rated as 47.06% | |
2021/03/13 22:48:28 | |
2021/03/13 22:48:28 Time Spent: 9m5.691s | |
2021/03/13 22:48:28 ----------------------------------------------------------------------------------- | |
name: arseni_semeniaka, master/01fb2ff @ 2021-03-13 11:45:31 +0000 | |
2021/03/13 22:48:28 config: tests/mysqldb-check.yml | |
2021/03/13 22:48:28 verbosity: 2 | |
2021/03/13 22:48:28 ----------------------------------------------------------------------------------- | |
2021/03/13 22:48:28 Running '2.3 MySQL DB Check', 1..16 tests | |
2021/03/13 22:48:28 ----------------------------------------------------------------------------------- | |
2021/03/13 22:48:30 ✗ [2.3 MySQL DB Check] -> 'mysql_db_check' role linter | |
2021/03/13 22:48:30 Result: exit status 1 | |
2021/03/13 22:48:30 Output: | |
2021/03/13 22:48:30 ✗ [2.3 MySQL DB Check] -> 'role-mysqldb-check.yml' playbook syntax check | |
2021/03/13 22:48:30 Result: exit status 4 | |
2021/03/13 22:48:30 Output: | |
[0;34mUsing /tmp/students-2/arseni_semeniaka/day2/2.3/ansible.cfg as config file | |
[0;31mERROR! Empty playbook, nothing to do | |
2021/03/13 22:48:33 ✗ [2.3 MySQL DB Check] -> apply 'role-mysqldb-check.yml' playbook | |
2021/03/13 22:48:33 Result: exit status 4 | |
2021/03/13 22:48:33 Output: | |
Error: No such container: db-check | |
eeab612e6cb7d7f1dde57dc7feef0eabb81ee7b90f3b0954c79ca25284d2ae10 | |
[0;34mUsing /tmp/students-2/arseni_semeniaka/day2/2.3/ansible.cfg as config file | |
[0;31mERROR! Empty playbook, nothing to do | |
2021/03/13 22:48:33 ✗ [2.3 MySQL DB Check] -> apply 'mysql_db_check' role (default settings) | |
2021/03/13 22:48:33 Result: exit status 1 | |
2021/03/13 22:48:33 Output: | |
2021/03/13 22:48:34 ✗ [2.3 MySQL DB Check] -> service responds 200 (after initial rollout) | |
2021/03/13 22:48:34 Result: exit status 7 | |
2021/03/13 22:48:34 Output: | |
* About to connect() to localhost port 8080 (#0) | |
* Trying 127.0.0.1... | |
* Connection refused | |
* Trying ::1... | |
* Failed to connect to ::1: Cannot assign requested address | |
* Failed connect to localhost:8080; Cannot assign requested address | |
* Closing connection 0 | |
2021/03/13 22:48:34 ✗ [2.3 MySQL DB Check] -> idempotency check (apply the role twice) | |
2021/03/13 22:48:34 Result: exit status 1 | |
2021/03/13 22:48:34 Output: | |
2021/03/13 22:48:34 ✗ [2.3 MySQL DB Check] -> service responds 200 (after idempotancy check) | |
2021/03/13 22:48:34 Result: exit status 7 | |
2021/03/13 22:48:34 Output: | |
* About to connect() to localhost port 8080 (#0) | |
* Trying 127.0.0.1... | |
* Connection refused | |
* Trying ::1... | |
* Failed to connect to ::1: Cannot assign requested address | |
* Failed connect to localhost:8080; Cannot assign requested address | |
* Closing connection 0 | |
2021/03/13 22:48:35 ✗ [2.3 MySQL DB Check] -> service is enabled | |
2021/03/13 22:48:35 Result: exit status 1 | |
2021/03/13 22:48:35 Output: | |
Failed to get unit file state for mysqldb-check.service: No such file or directory | |
2021/03/13 22:48:36 ✗ [2.3 MySQL DB Check] -> service runs under proper user/group | |
2021/03/13 22:48:36 Result: exit status 1 | |
2021/03/13 22:48:36 Output: | |
2021/03/13 22:48:36 ✗ [2.3 MySQL DB Check] -> application user has no password set | |
2021/03/13 22:48:36 Result: exit status 1 | |
2021/03/13 22:48:36 Output: | |
2021/03/13 22:48:40 ✗ [2.3 MySQL DB Check] -> trying another application port | |
2021/03/13 22:48:40 Result: exit status 1 | |
2021/03/13 22:48:40 Output: | |
db-check | |
0d112ee5aa856c7891668ac1e30bc5651f16522d3a91e77a37e27db36555ed37 | |
[0;34mUsing /tmp/students-2/arseni_semeniaka/day2/2.3/ansible.cfg as config file | |
PLAY [db-check] **************************************************************** | |
PLAY RECAP ********************************************************************* | |
* About to connect() to localhost port 8081 (#0) | |
* Trying 127.0.0.1... | |
* Connection refused | |
* Trying ::1... | |
* Failed to connect to ::1: Cannot assign requested address | |
* Failed connect to localhost:8081; Cannot assign requested address | |
* Closing connection 0 | |
2021/03/13 22:48:44 ✗ [2.3 MySQL DB Check] -> trying another application home dir | |
2021/03/13 22:48:44 Result: exit status 7 | |
2021/03/13 22:48:44 Output: | |
db-check | |
0943b90483b914c1129dd671424eedaa807d6798c20f49ebe9e94c3dd384d07b | |
[0;34mUsing /tmp/students-2/arseni_semeniaka/day2/2.3/ansible.cfg as config file | |
PLAY [db-check] **************************************************************** | |
PLAY RECAP ********************************************************************* | |
* About to connect() to localhost port 8080 (#0) | |
* Trying 127.0.0.1... | |
* Connection refused | |
* Trying ::1... | |
* Failed to connect to ::1: Cannot assign requested address | |
* Failed connect to localhost:8080; Cannot assign requested address | |
* Closing connection 0 | |
2021/03/13 22:48:48 ✗ [2.3 MySQL DB Check] -> trying another application user | |
2021/03/13 22:48:48 Result: exit status 7 | |
2021/03/13 22:48:48 Output: | |
db-check | |
219d82067ff4cd5026e1e58b99a9c452fcea29b198e623c57c34667a06d789eb | |
[0;34mUsing /tmp/students-2/arseni_semeniaka/day2/2.3/ansible.cfg as config file | |
PLAY [db-check] **************************************************************** | |
PLAY RECAP ********************************************************************* | |
* About to connect() to localhost port 8080 (#0) | |
* Trying 127.0.0.1... | |
* Connection refused | |
* Trying ::1... | |
* Failed to connect to ::1: Cannot assign requested address | |
* Failed connect to localhost:8080; Cannot assign requested address | |
* Closing connection 0 | |
2021/03/13 22:48:52 ✗ [2.3 MySQL DB Check] -> trying another application group | |
2021/03/13 22:48:52 Result: exit status 7 | |
2021/03/13 22:48:52 Output: | |
db-check | |
f6389854e765c83078d6ea27b7bbb57f5a9c9eb52c78a2ab1e1ea1325cb5a868 | |
[0;34mUsing /tmp/students-2/arseni_semeniaka/day2/2.3/ansible.cfg as config file | |
PLAY [db-check] **************************************************************** | |
PLAY RECAP ********************************************************************* | |
* About to connect() to localhost port 8080 (#0) | |
* Trying 127.0.0.1... | |
* Connection refused | |
* Trying ::1... | |
* Failed to connect to ::1: Cannot assign requested address | |
* Failed connect to localhost:8080; Cannot assign requested address | |
* Closing connection 0 | |
2021/03/13 22:48:56 ✗ [2.3 MySQL DB Check] -> rollout (Not ROOT) | |
2021/03/13 22:48:56 Result: exit status 7 | |
2021/03/13 22:48:56 Output: | |
db-check | |
437c111333ebaa2439e150f649058087db03ff652c75758c203c6ae1cd30eedf | |
[0;34mUsing /tmp/students-2/arseni_semeniaka/day2/2.3/ansible.cfg as config file | |
PLAY [db-check] **************************************************************** | |
PLAY RECAP ********************************************************************* | |
* About to connect() to localhost port 8080 (#0) | |
* Trying 127.0.0.1... | |
* Connection refused | |
* Trying ::1... | |
* Failed to connect to ::1: Cannot assign requested address | |
* Failed connect to localhost:8080; Cannot assign requested address | |
* Closing connection 0 | |
2021/03/13 22:48:58 ✗ [2.3 MySQL DB Check] -> idempotency check (Not ROOT) | |
2021/03/13 22:48:58 Result: exit status 1 | |
2021/03/13 22:48:58 Output: | |
(run, /tmp/students-2/arseni_semeniaka/day2/2.3) => ansible-playbook testing-role-mysqldb-check.yml -i db-check, -v -u devops | |
rc: 0 | |
output: | | |
[0;34mUsing /tmp/students-2/arseni_semeniaka/day2/2.3/ansible.cfg as config file | |
PLAY [db-check] **************************************************************** | |
PLAY RECAP ********************************************************************* | |
Stdout Assertion Failed (Partial, 'unreachable=0') | |
2021/03/13 22:48:58 ----------------------------------------------------------------------------------- | |
2021/03/13 22:48:58 Tests Summary: | |
2021/03/13 22:48:58 0 (of 16) tests passed, 16 tests failed; rated as 0.00% | |
2021/03/13 22:48:58 | |
2021/03/13 22:48:58 Time Spent: 30.046s | |
2021/03/13 22:48:58 ----------------------------------------------------------------------------------- |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment