-
-
Save sbeliakou/6a55a9aed9177831593ca2359d830cb1 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 'volha_huryna'... | |
name: volha_huryna, master/ce1a2e0 @ 2021-03-11 21:58:59 +0000 | |
2021/03/14 00:18:49 config: tests/encryption.yml | |
2021/03/14 00:18:49 verbosity: 2 | |
2021/03/14 00:18:49 ----------------------------------------------------------------------------------- | |
2021/03/14 00:18:49 Running '2.1 Working with Secrets', 1..8 tests | |
2021/03/14 00:18:49 ----------------------------------------------------------------------------------- | |
2021/03/14 00:18:49 ✓ [2.1 Working with Secrets] => 'spoiler1' decrypted correctly (1), 26ms | |
2021/03/14 00:18:49 ✓ [2.1 Working with Secrets] => 'spoiler2' decrypted correctly (1), 18ms | |
2021/03/14 00:18:49 ✓ [2.1 Working with Secrets] => 'spoiler3' decrypted correctly (1), 27ms | |
2021/03/14 00:18:49 ✓ [2.1 Working with Secrets] => 'spoiler4' decrypted correctly (1), 19ms | |
2021/03/14 00:18:50 ✓ [2.1 Working with Secrets] => 'secret1' encrypted with tag=dev (v1.2/AES256) (1), 27ms | |
2021/03/14 00:18:50 ✓ [2.1 Working with Secrets] => 'secret2' encrypted with tag=test (v1.2/AES256) (1), 25ms | |
2021/03/14 00:18:50 ✓ [2.1 Working with Secrets] => 'secret3' encrypted with tag=stage (v1.2/AES256) (1), 34ms | |
2021/03/14 00:18:50 ✓ [2.1 Working with Secrets] => 'secret4' encrypted with tag=prod (v1.2/AES256) (1), 33ms | |
2021/03/14 00:18:50 ----------------------------------------------------------------------------------- | |
2021/03/14 00:18:50 Tests Summary: | |
2021/03/14 00:18:50 8 (of 8) tests passed, 0 tests failed; rated as 100.00% | |
2021/03/14 00:18:50 | |
2021/03/14 00:18:50 Time Spent: 1.59s | |
2021/03/14 00:18:50 ----------------------------------------------------------------------------------- | |
name: volha_huryna, master/ce1a2e0 @ 2021-03-11 21:58:59 +0000 | |
2021/03/14 00:18:50 config: tests/role-deps.yml | |
2021/03/14 00:18:50 verbosity: 2 | |
2021/03/14 00:18:50 ----------------------------------------------------------------------------------- | |
2021/03/14 00:18:50 Running '2.2 Role Dependencies', 1..17 tests | |
2021/03/14 00:18:50 ----------------------------------------------------------------------------------- | |
2021/03/14 00:18:53 ✓ [2.2 Role Dependencies] => 'base' linter (1), 2.533s | |
2021/03/14 00:18:55 ✓ [2.2 Role Dependencies] => 'java' linter (1), 2.552s | |
2021/03/14 00:18:58 ✓ [2.2 Role Dependencies] => 'tomcat' linter (1), 2.337s | |
2021/03/14 00:19:00 ✓ [2.2 Role Dependencies] => 'nginx-base' linter (1), 2.281s | |
2021/03/14 00:19:03 ✓ [2.2 Role Dependencies] => 'nginx-custom' linter (1), 2.596s | |
2021/03/14 00:19:05 ✓ [2.2 Role Dependencies] => 'user' linter (1), 2.403s | |
2021/03/14 00:19:05 ✓ [2.2 Role Dependencies] => 'tomcat' role depends on 'java' role (1), 9ms | |
2021/03/14 00:19:05 ✓ [2.2 Role Dependencies] => 'tomcat' role calls 'java' role with 'java_version' parameter (1), 7ms | |
2021/03/14 00:19:05 ✓ [2.2 Role Dependencies] => 'tomcat' role depends on 'user' role (1), 9ms | |
2021/03/14 00:19:05 ✓ [2.2 Role Dependencies] => 'tomcat' role calls 'user' role with 'user_name' parameter (1), 8ms | |
2021/03/14 00:19:05 ✓ [2.2 Role Dependencies] => 'tomcat' role calls 'user' role with 'user_id' parameter (1), 9ms | |
2021/03/14 00:19:05 ✓ [2.2 Role Dependencies] => 'tomcat' role calls 'user' role with 'group_id' parameter (1), 7ms | |
2021/03/14 00:19:05 ✓ [2.2 Role Dependencies] => 'tomcat' role calls 'user' role with 'user_home' parameter (1), 9ms | |
2021/03/14 00:19:05 ✓ [2.2 Role Dependencies] => 'tomcat' role depends on 'base' role (1), 7ms | |
2021/03/14 00:19:05 ✓ [2.2 Role Dependencies] => 'java' role depends on 'base' role (1), 8ms | |
2021/03/14 00:19:05 ✓ [2.2 Role Dependencies] => 'nginx-base' role depends on 'base' role (1), 7ms | |
2021/03/14 00:19:05 ✓ [2.2 Role Dependencies] => 'nginx-custom' role depends on 'nginx-base' role (1), 9ms | |
2021/03/14 00:19:05 ----------------------------------------------------------------------------------- | |
2021/03/14 00:19:05 Tests Summary: | |
2021/03/14 00:19:05 17 (of 17) tests passed, 0 tests failed; rated as 100.00% | |
2021/03/14 00:19:05 | |
2021/03/14 00:19:05 Time Spent: 14.8s | |
2021/03/14 00:19:05 ----------------------------------------------------------------------------------- | |
name: volha_huryna, master/ce1a2e0 @ 2021-03-11 21:58:59 +0000 | |
2021/03/14 00:19:05 config: tests/base.yml | |
2021/03/14 00:19:05 verbosity: 2 | |
2021/03/14 00:19:05 ----------------------------------------------------------------------------------- | |
2021/03/14 00:19:05 Running '2.3 Base Role (centos 7)', 1..11 tests | |
2021/03/14 00:19:05 ----------------------------------------------------------------------------------- | |
2021/03/14 00:19:11 ✗ [2.3 Base Role (centos 7)] -> Role Linter | |
2021/03/14 00:19:11 Result: exit status 2 | |
2021/03/14 00:19:11 Output: | |
Added ANSIBLE_ROLES_PATH=~/.ansible/roles:/usr/share/ansible/roles:/etc/ansible/roles:roles | |
WARNING Listing 3 violation(s) that are fatal | |
risky-file-permissions: File permissions unset or incorrect | |
roles/base/tasks/main.yml:13 Task/Handler: Create folder for gathering facts | |
no-handler: Tasks that run when changed should likely be handlers | |
roles/base/tasks/main.yml:20 Task/Handler: Collect all facts in folder | |
risky-file-permissions: File permissions unset or incorrect | |
roles/base/tasks/main.yml:20 Task/Handler: Collect all facts in folder | |
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 | |
- experimental # all rules tagged as experimental | |
- no-handler # Tasks that run when changed should likely be handlers | |
Finished with [1;34m1 failure(s), [1;34m2 warning(s) on [1;34m2 files. | |
2021/03/14 00:19:12 ✓ [2.3 Base Role (centos 7)] => playbook syntax check (1), 1.174s | |
2021/03/14 00:19:23 ✓ [2.3 Base Role (centos 7)] => apply role (5), 11.226s | |
2021/03/14 00:19:31 ✓ [2.3 Base Role (centos 7)] => idempotence check (apply the role twice) (5), 8.106s | |
2021/03/14 00:19:31 ✗ [2.3 Base Role (centos 7)] -> role installs 'epel' repo | |
2021/03/14 00:19:31 Result: exit status 1 | |
2021/03/14 00:19:31 Output: | |
2021-03-14 00:19:27,259 p=26498 u=root n=ansible | ok: [centos7] => (item=epel-release) => {"ansible_facts": {"discovered_interpreter_python": "/usr/bin/python"}, "ansible_loop_var": "item", "changed": false, "item": "epel-release", "msg": "", "rc": 0, "results": []} | |
2021/03/14 00:19:31 ✗ [2.3 Base Role (centos 7)] -> role installs 'curl' package | |
2021/03/14 00:19:31 Result: exit status 1 | |
2021/03/14 00:19:31 Output: | |
2021-03-14 00:19:29,018 p=26498 u=root n=ansible | ok: [centos7] => (item=curl) => {"ansible_facts": {"pkg_mgr": "yum"}, "ansible_loop_var": "item", "changed": false, "item": "curl", "msg": "", "rc": 0, "results": []} | |
2021/03/14 00:19:31 ✗ [2.3 Base Role (centos 7)] -> role installs 'wget' package | |
2021/03/14 00:19:31 Result: exit status 1 | |
2021/03/14 00:19:31 Output: | |
2021-03-14 00:19:29,650 p=26498 u=root n=ansible | ok: [centos7] => (item=wget) => {"ansible_facts": {"pkg_mgr": "yum"}, "ansible_loop_var": "item", "changed": false, "item": "wget", "msg": "", "rc": 0, "results": []} | |
2021/03/14 00:19:31 ✗ [2.3 Base Role (centos 7)] -> role installs 'sudo' package | |
2021/03/14 00:19:31 Result: exit status 1 | |
2021/03/14 00:19:31 Output: | |
2021-03-14 00:19:30,225 p=26498 u=root n=ansible | ok: [centos7] => (item=sudo) => {"ansible_facts": {"pkg_mgr": "yum"}, "ansible_loop_var": "item", "changed": false, "item": "sudo", "msg": "", "rc": 0, "results": []} | |
2021/03/14 00:19:31 ✗ [2.3 Base Role (centos 7)] -> role installs 'iproute' package | |
2021/03/14 00:19:31 Result: exit status 1 | |
2021/03/14 00:19:31 Output: | |
2021-03-14 00:19:30,775 p=26498 u=root n=ansible | ok: [centos7] => (item=iproute) => {"ansible_facts": {"pkg_mgr": "yum"}, "ansible_loop_var": "item", "changed": false, "item": "iproute", "msg": "", "rc": 0, "results": []} | |
2021/03/14 00:19:31 ✗ [2.3 Base Role (centos 7)] -> role installs 'python-pip' package | |
2021/03/14 00:19:31 Result: exit status 1 | |
2021/03/14 00:19:31 Output: | |
2021-03-14 00:19:28,373 p=26498 u=root n=ansible | ok: [centos7] => (item=python-pip) => {"ansible_facts": {"pkg_mgr": "yum"}, "ansible_loop_var": "item", "changed": false, "item": "python-pip", "msg": "", "rc": 0, "results": []} | |
2021/03/14 00:19:31 ✓ [2.3 Base Role (centos 7)] => role creates ansible facts folder (1), 155ms | |
2021/03/14 00:19:32 ----------------------------------------------------------------------------------- | |
2021/03/14 00:19:32 Tests Summary: | |
2021/03/14 00:19:32 4 (of 11) tests passed, 7 tests failed; rated as 63.16% | |
2021/03/14 00:19:32 | |
2021/03/14 00:19:32 Time Spent: 26.995s | |
2021/03/14 00:19:32 ----------------------------------------------------------------------------------- | |
name: volha_huryna, master/ce1a2e0 @ 2021-03-11 21:58:59 +0000 | |
2021/03/14 00:19:32 config: tests/user.yml | |
2021/03/14 00:19:32 verbosity: 2 | |
2021/03/14 00:19:32 ----------------------------------------------------------------------------------- | |
2021/03/14 00:19:32 Running '2.3 User Role (CentOS 7)', 1..17 tests | |
2021/03/14 00:19:32 ----------------------------------------------------------------------------------- | |
2021/03/14 00:19:38 ✓ [2.3 User Role (CentOS 7)] => Role Linter (1), 3.951s | |
2021/03/14 00:19:39 ✓ [2.3 User Role (CentOS 7)] => playbook syntax check (1), 1.293s | |
2021/03/14 00:19:56 ✗ [2.3 User Role (CentOS 7)] -> apply role | |
2021/03/14 00:19:56 Result: exit status 2 | |
2021/03/14 00:19:56 Output: | |
- hosts: all | |
gather_facts: no | |
vars: | |
user_name: debug6 | |
roles: | |
- user | |
- hosts: all | |
gather_facts: no | |
roles: | |
- role: user | |
user_name: debug1 | |
- role: user | |
user_name: debug2 | |
user_group: debug2_group | |
- role: user | |
user_name: debug3 | |
user_id: 1234 | |
user_group: debug3_group | |
- role: user | |
user_name: debug4 | |
user_id: 1345 | |
user_group: debug2_group | |
user_gid: 1366 | |
- role: user | |
user_name: debug5 | |
user_home: /opt/debug5_home | |
- role: user | |
user_name: debug7 | |
user_home_create: no | |
- role: user | |
user_name: debug8 | |
user_shell: /usr/bin/false | |
- role: user | |
user_name: debug9 | |
user_sudo_privs: "ALL=(ALL) NOPASSWD:ALL" | |
[0;34mNo config file found; using defaults | |
PLAY [all] ********************************************************************* | |
TASK [user : Create user group] ************************************************ | |
[0;33mchanged: [centos7] => {"ansible_facts": {"discovered_interpreter_python": "/usr/bin/python"}, "changed": true, "gid": 1001, "name": "debug6", "state": "present", "system": false} | |
TASK [user : Create user] ****************************************************** | |
[0;33mchanged: [centos7] => {"ansible_facts": {}, "changed": true, "comment": "", "create_home": true, "group": 1001, "home": "/home/debug6", "name": "debug6", "shell": "/bin/sh", "state": "present", "system": false, "uid": 1001} | |
PLAY [all] ********************************************************************* | |
TASK [user : Create user group] ************************************************ | |
[0;33mchanged: [centos7] => {"ansible_facts": {}, "changed": true, "gid": 1002, "name": "debug1", "state": "present", "system": false} | |
TASK [user : Create user] ****************************************************** | |
[0;33mchanged: [centos7] => {"ansible_facts": {}, "changed": true, "comment": "", "create_home": true, "group": 1002, "home": "/home/debug1", "name": "debug1", "shell": "/bin/sh", "state": "present", "system": false, "uid": 1002} | |
TASK [user : Create user group] ************************************************ | |
[0;33mchanged: [centos7] => {"ansible_facts": {}, "changed": true, "gid": 1003, "name": "debug2_group", "state": "present", "system": false} | |
TASK [user : Create user] ****************************************************** | |
[0;33mchanged: [centos7] => {"ansible_facts": {}, "changed": true, "comment": "", "create_home": true, "group": 1003, "home": "/home/debug2", "name": "debug2", "shell": "/bin/sh", "state": "present", "system": false, "uid": 1003} | |
TASK [user : Create user group] ************************************************ | |
[0;31mfatal: [centos7]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: {{ omit if user_id is not defined }}: the inline if-expression on line 1 evaluated to false and no else section was defined.\n\nThe error appears to be in '/tmp/students-2/volha_huryna/day2/2.3/roles/user/tasks/main.yml': line 1, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- name: Create user group\n ^ here\n"} | |
PLAY RECAP ********************************************************************* | |
[0;31mcentos7 : [0;32mok=6 [0;33mchanged=6 unreachable=0 [0;31mfailed=1 skipped=0 rescued=0 ignored=0 | |
2021/03/14 00:20:05 ✗ [2.3 User Role (CentOS 7)] -> idempotence check (apply role twice) | |
2021/03/14 00:20:05 Result: exit status 2 | |
2021/03/14 00:20:05 Output: | |
[0;34mNo config file found; using defaults | |
PLAY [all] ********************************************************************* | |
TASK [user : Create user group name={{ user_group }}, gid={{ user_gid }}, state=present] *** | |
[0;32mok: [centos7] => {"ansible_facts": {"discovered_interpreter_python": "/usr/bin/python"}, "changed": false, "gid": 1001, "name": "debug6", "state": "present", "system": false} | |
TASK [user : Create user name={{ user_name }}, uid={{ omit if user_id is not defined }}, group={{ user_group }}, create_home={{ user_home_create }}, home={{ user_home }}, shell={{ user_shell }}, state=present] *** | |
[0;32mok: [centos7] => {"ansible_facts": {}, "append": false, "changed": false, "comment": "", "group": 1001, "home": "/home/debug6", "move_home": false, "name": "debug6", "shell": "/bin/sh", "state": "present", "uid": 1001} | |
PLAY [all] ********************************************************************* | |
TASK [user : Create user group name={{ user_group }}, gid={{ user_gid }}, state=present] *** | |
[0;32mok: [centos7] => {"ansible_facts": {}, "changed": false, "gid": 1002, "name": "debug1", "state": "present", "system": false} | |
TASK [user : Create user name={{ user_name }}, uid={{ omit if user_id is not defined }}, group={{ user_group }}, create_home={{ user_home_create }}, home={{ user_home }}, shell={{ user_shell }}, state=present] *** | |
[0;32mok: [centos7] => {"ansible_facts": {}, "append": false, "changed": false, "comment": "", "group": 1002, "home": "/home/debug1", "move_home": false, "name": "debug1", "shell": "/bin/sh", "state": "present", "uid": 1002} | |
TASK [user : Create user group name={{ user_group }}, gid={{ user_gid }}, state=present] *** | |
[0;32mok: [centos7] => {"ansible_facts": {}, "changed": false, "gid": 1003, "name": "debug2_group", "state": "present", "system": false} | |
TASK [user : Create user name={{ user_name }}, uid={{ omit if user_id is not defined }}, group={{ user_group }}, create_home={{ user_home_create }}, home={{ user_home }}, shell={{ user_shell }}, state=present] *** | |
[0;32mok: [centos7] => {"ansible_facts": {}, "append": false, "changed": false, "comment": "", "group": 1003, "home": "/home/debug2", "move_home": false, "name": "debug2", "shell": "/bin/sh", "state": "present", "uid": 1003} | |
TASK [user : Create user group name={{ user_group }}, gid={{ user_gid }}, state=present] *** | |
[0;31mfatal: [centos7]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: {{ omit if user_id is not defined }}: the inline if-expression on line 1 evaluated to false and no else section was defined.\n\nThe error appears to be in '/tmp/students-2/volha_huryna/day2/2.3/roles/user/tasks/main.yml': line 1, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- name: Create user group\n ^ here\n"} | |
PLAY RECAP ********************************************************************* | |
[0;31mcentos7 : [0;32mok=6 changed=0 unreachable=0 [0;31mfailed=1 skipped=0 rescued=0 ignored=0 | |
2021/03/14 00:20:05 ✓ [2.3 User Role (CentOS 7)] => use "user_name" varaible (1), 233ms | |
2021/03/14 00:20:05 ✓ [2.3 User Role (CentOS 7)] => use "user_name", "user_group" variables (1), 170ms | |
2021/03/14 00:20:05 ✗ [2.3 User Role (CentOS 7)] -> use "user_name", "user_id", "user_group" variables | |
2021/03/14 00:20:05 Result: exit status 1 | |
2021/03/14 00:20:05 Output: | |
id: debug3: no such user | |
2021/03/14 00:20:06 ✗ [2.3 User Role (CentOS 7)] -> use "user_name", "user_id", "user_group", "user_gid" variables | |
2021/03/14 00:20:06 Result: exit status 1 | |
2021/03/14 00:20:06 Output: | |
id: debug4: no such user | |
2021/03/14 00:20:06 ✗ [2.3 User Role (CentOS 7)] -> use "user_home" variable | |
2021/03/14 00:20:06 Result: exit status 1 | |
2021/03/14 00:20:06 Output: | |
2021/03/14 00:20:06 ✗ [2.3 User Role (CentOS 7)] -> set correct home permissions | |
2021/03/14 00:20:06 Result: exit status 1 | |
2021/03/14 00:20:06 Output: | |
stat: cannot stat ‘/opt/debug5_home’: No such file or directory | |
2021/03/14 00:20:06 ✗ [2.3 User Role (CentOS 7)] -> user owns its home directory | |
2021/03/14 00:20:06 Result: exit status 1 | |
2021/03/14 00:20:06 Output: | |
stat: cannot stat ‘/opt/debug5_home’: No such file or directory | |
2021/03/14 00:20:07 ✓ [2.3 User Role (CentOS 7)] => use "user_name" from play vars (1), 332ms | |
2021/03/14 00:20:07 ✗ [2.3 User Role (CentOS 7)] -> doesn't create home dir if required | |
2021/03/14 00:20:07 Result: exit status 1 | |
2021/03/14 00:20:07 Output: | |
2021/03/14 00:20:07 ✗ [2.3 User Role (CentOS 7)] -> use "user_shell" variable | |
2021/03/14 00:20:07 Result: exit status 1 | |
2021/03/14 00:20:07 Output: | |
2021/03/14 00:20:08 ✗ [2.3 User Role (CentOS 7)] -> setting custom sudo priviliges | |
2021/03/14 00:20:08 Result: exit status 1 | |
2021/03/14 00:20:08 Output: | |
sudo: unknown user: debug9 | |
sudo: unable to initialize policy plugin | |
2021/03/14 00:20:08 ✓ [2.3 User Role (CentOS 7)] => doesn't create sudo priviliges for all users (1), 255ms | |
2021/03/14 00:20:08 ✗ [2.3 User Role (CentOS 7)] -> setting custom sudo priviliges - checking validation parameter | |
2021/03/14 00:20:08 Result: exit status 1 | |
2021/03/14 00:20:08 Output: | |
2021/03/14 00:20:10 ----------------------------------------------------------------------------------- | |
2021/03/14 00:20:10 Tests Summary: | |
2021/03/14 00:20:10 6 (of 17) tests passed, 11 tests failed; rated as 24.00% | |
2021/03/14 00:20:10 | |
2021/03/14 00:20:10 Time Spent: 37.596s | |
2021/03/14 00:20:10 ----------------------------------------------------------------------------------- | |
name: volha_huryna, master/ce1a2e0 @ 2021-03-11 21:58:59 +0000 | |
2021/03/14 00:20:10 config: tests/webapp-server.yml | |
2021/03/14 00:20:10 verbosity: 2 | |
2021/03/14 00:20:10 ----------------------------------------------------------------------------------- | |
2021/03/14 00:20:10 Running '2.3 WebApp-Server Role (centos 7)', 1..17 tests | |
2021/03/14 00:20:10 ----------------------------------------------------------------------------------- | |
2021/03/14 00:20:17 ✓ [2.3 WebApp-Server Role (centos 7)] => role linter (1), 5.048s | |
2021/03/14 00:20:18 ✓ [2.3 WebApp-Server Role (centos 7)] => playbook syntax check (1), 1.323s | |
2021/03/14 00:20:25 ✗ [2.3 WebApp-Server Role (centos 7)] -> apply role | |
2021/03/14 00:20:25 Result: exit status 2 | |
2021/03/14 00:20:25 Output: | |
2021/03/14 00:20:29 ✗ [2.3 WebApp-Server Role (centos 7)] -> idempotence check (apply the role twice) | |
2021/03/14 00:20:29 Result: exit status 1 | |
2021/03/14 00:20:29 Output: | |
(run, /tmp/students-2/volha_huryna/day2/2.3) => ansible-playbook testing-role-webapp-server.yml -i default, -v -e ansible_host=centos7 | |
rc: 2 | |
output: | | |
[0;34mNo config file found; using defaults | |
PLAY [all] ********************************************************************* | |
TASK [Gathering Facts] ********************************************************* | |
[0;32mok: [default] | |
TASK [user : Create user group] ************************************************ | |
[0;31mfatal: [default]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: {{ user_name }}: {{ webapp_server_user }}: 'webapp_server_user' is undefined\n\nThe error appears to be in '/tmp/students-2/volha_huryna/day2/2.3/roles/user/tasks/main.yml': line 1, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- name: Create user group\n ^ here\n"} | |
PLAY RECAP ********************************************************************* | |
[0;31mdefault : [0;32mok=1 changed=0 unreachable=0 [0;31mfailed=1 skipped=0 rescued=0 ignored=0 | |
CMD Failed: ansible-playbook testing-role-webapp-server.yml -i default, -v -e ansible_host=centos7 | |
2021/03/14 00:20:29 ✓ [2.3 WebApp-Server Role (centos 7)] => role depends on 'user' role (1), 10ms | |
2021/03/14 00:20:29 ✓ [2.3 WebApp-Server Role (centos 7)] => passing variables to 'user' role: 'webapp_server_user' (1), 11ms | |
2021/03/14 00:20:29 ✗ [2.3 WebApp-Server Role (centos 7)] -> passing variables to 'user' role: 'webapp_server_group' | |
2021/03/14 00:20:29 Result: exit status 1 | |
2021/03/14 00:20:29 Output: | |
2021/03/14 00:20:29 ✗ [2.3 WebApp-Server Role (centos 7)] -> service responds 200 | |
2021/03/14 00:20:29 Result: exit status 7 | |
2021/03/14 00:20:29 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/14 00:20:29 ✗ [2.3 WebApp-Server Role (centos 7)] -> service is enabled | |
2021/03/14 00:20:29 Result: exit status 1 | |
2021/03/14 00:20:29 Output: | |
Failed to get unit file state for webapp-server.service: No such file or directory | |
2021/03/14 00:20:29 ✗ [2.3 WebApp-Server Role (centos 7)] -> service runs under proper user/group | |
2021/03/14 00:20:29 Result: exit status 1 | |
2021/03/14 00:20:29 Output: | |
2021/03/14 00:20:29 ✗ [2.3 WebApp-Server Role (centos 7)] -> application user has no password set | |
2021/03/14 00:20:29 Result: exit status 1 | |
2021/03/14 00:20:29 Output: | |
2021/03/14 00:20:33 ✗ [2.3 WebApp-Server Role (centos 7)] -> stress-test: updating server application | |
2021/03/14 00:20:33 Result: exit status 2 | |
2021/03/14 00:20:33 Output: | |
[0;34mNo config file found; using defaults | |
PLAY [all] ********************************************************************* | |
TASK [Gathering Facts] ********************************************************* | |
[0;32mok: [default] | |
TASK [user : Create user group] ************************************************ | |
[0;31mfatal: [default]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: {{ user_name }}: {{ webapp_server_user }}: 'webapp_server_user' is undefined\n\nThe error appears to be in '/tmp/students-2/volha_huryna/day2/2.3/roles/user/tasks/main.yml': line 1, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- name: Create user group\n ^ here\n"} | |
PLAY RECAP ********************************************************************* | |
[0;31mdefault : [0;32mok=1 changed=0 unreachable=0 [0;31mfailed=1 skipped=0 rescued=0 ignored=0 | |
2021/03/14 00:20:43 ✗ [2.3 WebApp-Server Role (centos 7)] -> stress-test: changing application port | |
2021/03/14 00:20:43 Result: exit status 2 | |
2021/03/14 00:20:43 Output: | |
centos7 | |
69a0b9dedde619762496ed19610f93c3a43177184869458fb728db1fec03b34a | |
[0;34mNo config file found; using defaults | |
PLAY [all] ********************************************************************* | |
TASK [Gathering Facts] ********************************************************* | |
[0;32mok: [default] | |
TASK [user : Create user group] ************************************************ | |
[0;31mfatal: [default]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: {{ user_name }}: {{ webapp_server_user }}: 'webapp_server_user' is undefined\n\nThe error appears to be in '/tmp/students-2/volha_huryna/day2/2.3/roles/user/tasks/main.yml': line 1, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- name: Create user group\n ^ here\n"} | |
PLAY RECAP ********************************************************************* | |
[0;31mdefault : [0;32mok=1 changed=0 unreachable=0 [0;31mfailed=1 skipped=0 rescued=0 ignored=0 | |
2021/03/14 00:20:53 ✗ [2.3 WebApp-Server Role (centos 7)] -> stress-test: changing student name | |
2021/03/14 00:20:53 Result: exit status 2 | |
2021/03/14 00:20:53 Output: | |
centos7 | |
7d0a69d47e904399c57a2b40e0884985baf57bd7d346f9fd48d63215be39a7b4 | |
[0;34mNo config file found; using defaults | |
PLAY [all] ********************************************************************* | |
TASK [Gathering Facts] ********************************************************* | |
[0;32mok: [default] | |
TASK [user : Create user group] ************************************************ | |
[0;31mfatal: [default]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: {{ user_name }}: {{ webapp_server_user }}: 'webapp_server_user' is undefined\n\nThe error appears to be in '/tmp/students-2/volha_huryna/day2/2.3/roles/user/tasks/main.yml': line 1, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- name: Create user group\n ^ here\n"} | |
PLAY RECAP ********************************************************************* | |
[0;31mdefault : [0;32mok=1 changed=0 unreachable=0 [0;31mfailed=1 skipped=0 rescued=0 ignored=0 | |
2021/03/14 00:21:01 ✗ [2.3 WebApp-Server Role (centos 7)] -> stress-test: changing application home dir | |
2021/03/14 00:21:01 Result: exit status 2 | |
2021/03/14 00:21:01 Output: | |
centos7 | |
841832579bed8146938c63298a61befbb21d8cfee9ebc32a756a36a97ba08c04 | |
[0;34mNo config file found; using defaults | |
PLAY [all] ********************************************************************* | |
TASK [Gathering Facts] ********************************************************* | |
[0;32mok: [default] | |
TASK [user : Create user group] ************************************************ | |
[0;31mfatal: [default]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: {{ user_name }}: {{ webapp_server_user }}: 'webapp_server_user' is undefined\n\nThe error appears to be in '/tmp/students-2/volha_huryna/day2/2.3/roles/user/tasks/main.yml': line 1, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- name: Create user group\n ^ here\n"} | |
PLAY RECAP ********************************************************************* | |
[0;31mdefault : [0;32mok=1 changed=0 unreachable=0 [0;31mfailed=1 skipped=0 rescued=0 ignored=0 | |
2021/03/14 00:21:14 ✗ [2.3 WebApp-Server Role (centos 7)] -> rollout (Not ROOT) | |
2021/03/14 00:21:14 Result: exit status 2 | |
2021/03/14 00:21:14 Output: | |
centos7 | |
3b021c904fef46901b529f8c89b89dbeeec11e16ed5ed1f76d53cf423de91242 | |
[0;34mNo config file found; using defaults | |
PLAY [all] ********************************************************************* | |
TASK [Gathering Facts] ********************************************************* | |
[0;32mok: [default] | |
TASK [user : Create user group] ************************************************ | |
[0;31mfatal: [default]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: {{ user_name }}: {{ webapp_server_user }}: 'webapp_server_user' is undefined\n\nThe error appears to be in '/tmp/students-2/volha_huryna/day2/2.3/roles/user/tasks/main.yml': line 1, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- name: Create user group\n ^ here\n"} | |
PLAY RECAP ********************************************************************* | |
[0;31mdefault : [0;32mok=1 changed=0 unreachable=0 [0;31mfailed=1 skipped=0 rescued=0 ignored=0 | |
2021/03/14 00:21:20 ✗ [2.3 WebApp-Server Role (centos 7)] -> idempotancy check (Not ROOT) | |
2021/03/14 00:21:20 Result: exit status 1 | |
2021/03/14 00:21:20 Output: | |
(run, /tmp/students-2/volha_huryna/day2/2.3) => ansible-playbook testing-role-webapp-server.yml -i default, -e ansible_host=centos7 -v -u devops | |
rc: 2 | |
output: | | |
[0;34mNo config file found; using defaults | |
PLAY [all] ********************************************************************* | |
TASK [Gathering Facts] ********************************************************* | |
[0;32mok: [default] | |
TASK [user : Create user group] ************************************************ | |
[0;31mfatal: [default]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: {{ user_name }}: {{ webapp_server_user }}: 'webapp_server_user' is undefined\n\nThe error appears to be in '/tmp/students-2/volha_huryna/day2/2.3/roles/user/tasks/main.yml': line 1, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- name: Create user group\n ^ here\n"} | |
PLAY RECAP ********************************************************************* | |
[0;31mdefault : [0;32mok=1 changed=0 unreachable=0 [0;31mfailed=1 skipped=0 rescued=0 ignored=0 | |
CMD Failed: | |
2021/03/14 00:21:21 ----------------------------------------------------------------------------------- | |
2021/03/14 00:21:21 Tests Summary: | |
2021/03/14 00:21:21 4 (of 17) tests passed, 13 tests failed; rated as 12.12% | |
2021/03/14 00:21:21 | |
2021/03/14 00:21:21 Time Spent: 1m10.724s | |
2021/03/14 00:21:21 ----------------------------------------------------------------------------------- | |
name: volha_huryna, master/ce1a2e0 @ 2021-03-11 21:58:59 +0000 | |
2021/03/14 00:21:21 config: tests/mysqldb.yml | |
2021/03/14 00:21:21 verbosity: 2 | |
2021/03/14 00:21:21 ----------------------------------------------------------------------------------- | |
2021/03/14 00:21:21 Running '2.3 MysqlDB Role (CentOS 7)', 1..17 tests | |
2021/03/14 00:21:21 ----------------------------------------------------------------------------------- | |
2021/03/14 00:21:26 ✓ [2.3 MysqlDB Role (CentOS 7)] => 'mysql_db' role linter (1), 3.947s | |
2021/03/14 00:21:30 ✓ [2.3 MysqlDB Role (CentOS 7)] => 'mysql_db_user' role linter (1), 3.988s | |
2021/03/14 00:21:31 ✓ [2.3 MysqlDB Role (CentOS 7)] => playbook syntax check (1), 1.135s | |
2021/03/14 00:24:31 ✓ [2.3 MysqlDB Role (CentOS 7)] => running role-mysqldb.yml playbook (1), 2m59.909s | |
2021/03/14 00:27:38 ✓ [2.3 MysqlDB Role (CentOS 7)] => apply 'mysql_db' role (1), 3m6.525s | |
2021/03/14 00:27:46 ✓ [2.3 MysqlDB Role (CentOS 7)] => apply 'mysql_db' role again (1), 8.083s | |
2021/03/14 00:27:50 ✓ [2.3 MysqlDB Role (CentOS 7)] => apply 'mysql_db_user' role (1), 4.516s | |
2021/03/14 00:27:54 ✗ [2.3 MysqlDB Role (CentOS 7)] -> apply 'mysql_db_user' role again | |
2021/03/14 00:27:54 Result: exit status 1 | |
2021/03/14 00:27:54 Output: | |
[0;34mNo config file found; using defaults | |
PLAY [db] ********************************************************************** | |
TASK [mysql_db_user : Create database user with password and all database privileges and 'WITH GRANT OPTION' login_user=root, login_password={{ mysqldb_root_password }}, name={{ mysqldb_user }}, password={{ mysqldb_password }}, priv=*.*:ALL,GRANT, state=present, host=%] *** | |
[0;33mchanged: [db] => {"ansible_facts": {"discovered_interpreter_python": "/usr/bin/python"}, "changed": true, "msg": "Privileges updated", "user": "jdoe"} | |
TASK [mysql_db_user : Create a new database login_user={{ mysqldb_user }}, login_password={{ mysqldb_password }}, name={{ mysqldb_database }}, state=present] *** | |
[0;32mok: [db] => {"ansible_facts": {}, "changed": false, "db": "jdoe_db", "db_list": ["jdoe_db"], "executed_commands": []} | |
PLAY RECAP ********************************************************************* | |
[0;33mdb : [0;32mok=2 [0;33mchanged=1 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 | |
2021-03-14 00:27:54,648 p=18168 u=root n=ansible | db : ok=2 changed=1 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 | |
2021/03/14 00:27:55 ✓ [2.3 MysqlDB Role (CentOS 7)] => db service is enabled (1), 199ms | |
2021/03/14 00:27:55 ✓ [2.3 MysqlDB Role (CentOS 7)] => db service is active (1), 165ms | |
2021/03/14 00:27:55 ✓ [2.3 MysqlDB Role (CentOS 7)] => db service is running on 3306 (1), 163ms | |
2021/03/14 00:27:55 ✓ [2.3 MysqlDB Role (CentOS 7)] => db root password set (1), 217ms | |
2021/03/14 00:27:55 ✓ [2.3 MysqlDB Role (CentOS 7)] => custom db user (non-root) created (1), 227ms | |
2021/03/14 00:31:17 ✓ [2.3 MysqlDB Role (CentOS 7)] => apply 'mysql_db' role (Not ROOT) (1), 3m21.248s | |
2021/03/14 00:31:24 ✓ [2.3 MysqlDB Role (CentOS 7)] => apply 'mysql_db' role (Not ROOT) again (1), 7.603s | |
2021/03/14 00:31:28 ✓ [2.3 MysqlDB Role (CentOS 7)] => apply 'mysql_db_user' role (Not ROOT) (1), 3.987s | |
2021/03/14 00:31:33 ✗ [2.3 MysqlDB Role (CentOS 7)] -> apply 'mysql_db_user' role (Not ROOT) again | |
2021/03/14 00:31:33 Result: exit status 1 | |
2021/03/14 00:31:33 Output: | |
PLAY [db] ********************************************************************** | |
TASK [mysql_db_user : Create database user with password and all database privileges and 'WITH GRANT OPTION'] *** | |
[0;33mchanged: [db] | |
TASK [mysql_db_user : Create a new database] *********************************** | |
[0;32mok: [db] | |
PLAY RECAP ********************************************************************* | |
[0;33mdb : [0;32mok=2 [0;33mchanged=1 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 | |
2021-03-14 00:31:32,950 p=8464 u=root n=ansible | db : ok=2 changed=1 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 | |
2021/03/14 00:31:34 ----------------------------------------------------------------------------------- | |
2021/03/14 00:31:34 Tests Summary: | |
2021/03/14 00:31:34 15 (of 17) tests passed, 2 tests failed; rated as 88.24% | |
2021/03/14 00:31:34 | |
2021/03/14 00:31:34 Time Spent: 10m13.899s | |
2021/03/14 00:31:34 ----------------------------------------------------------------------------------- | |
name: volha_huryna, master/ce1a2e0 @ 2021-03-11 21:58:59 +0000 | |
2021/03/14 00:31:34 config: tests/mysqldb-check.yml | |
2021/03/14 00:31:34 verbosity: 2 | |
2021/03/14 00:31:34 ----------------------------------------------------------------------------------- | |
2021/03/14 00:31:34 Running '2.3 MySQL DB Check', 1..16 tests | |
2021/03/14 00:31:34 ----------------------------------------------------------------------------------- | |
2021/03/14 00:31:40 ✓ [2.3 MySQL DB Check] => 'mysql_db_check' role linter (1), 3.823s | |
2021/03/14 00:31:41 ✓ [2.3 MySQL DB Check] => 'role-mysqldb-check.yml' playbook syntax check (1), 1.441s | |
2021/03/14 00:32:04 ✓ [2.3 MySQL DB Check] => apply 'role-mysqldb-check.yml' playbook (1), 23.249s | |
2021/03/14 00:32:26 ✓ [2.3 MySQL DB Check] => apply 'mysql_db_check' role (default settings) (1), 22.088s | |
2021/03/14 00:32:27 ✓ [2.3 MySQL DB Check] => service responds 200 (after initial rollout) (1), 286ms | |
2021/03/14 00:32:40 ✓ [2.3 MySQL DB Check] => idempotency check (apply the role twice) (1), 13.587s | |
2021/03/14 00:32:41 ✓ [2.3 MySQL DB Check] => service responds 200 (after idempotancy check) (1), 181ms | |
2021/03/14 00:32:41 ✓ [2.3 MySQL DB Check] => service is enabled (1), 153ms | |
2021/03/14 00:32:41 ✓ [2.3 MySQL DB Check] => service runs under proper user/group (1), 378ms | |
2021/03/14 00:32:41 ✓ [2.3 MySQL DB Check] => application user has no password set (1), 183ms | |
2021/03/14 00:33:09 ✓ [2.3 MySQL DB Check] => trying another application port (1), 27.337s | |
2021/03/14 00:33:29 ✗ [2.3 MySQL DB Check] -> trying another application home dir | |
2021/03/14 00:33:29 Result: exit status 7 | |
2021/03/14 00:33:29 Output: | |
db-check | |
b7d66aeec1c2208dbb399347d81a735bb9f33f09cd27950720451e2ee895f45b | |
[0;34mNo config file found; using defaults | |
PLAY [db-check] **************************************************************** | |
TASK [user : Create user group] ************************************************ | |
[0;33mchanged: [db-check] => {"ansible_facts": {"discovered_interpreter_python": "/usr/bin/python"}, "changed": true, "gid": 1001, "name": "mysqldb-check", "state": "present", "system": false} | |
TASK [user : Create user] ****************************************************** | |
[0;33mchanged: [db-check] => {"ansible_facts": {}, "changed": true, "comment": "", "create_home": true, "group": 1001, "home": "/home/mysqldb-check", "name": "mysqldb-check", "shell": "/bin/sh", "state": "present", "system": false, "uid": 1001} | |
TASK [mysql_db_check : Create app folders] ************************************* | |
[0;33mchanged: [db-check] => (item=bin) => {"ansible_facts": {}, "ansible_loop_var": "item", "changed": true, "gid": 1001, "group": "mysqldb-check", "item": "bin", "mode": "0755", "owner": "mysqldb-check", "path": "/opt/mysqldb-check-test/bin/", "size": 4096, "state": "directory", "uid": 1001} | |
[0;33mchanged: [db-check] => (item=config) => {"ansible_loop_var": "item", "changed": true, "gid": 1001, "group": "mysqldb-check", "item": "config", "mode": "0755", "owner": "mysqldb-check", "path": "/opt/mysqldb-check-test/config/", "size": 4096, "state": "directory", "uid": 1001} | |
TASK [mysql_db_check : Download webapp] **************************************** | |
[0;33mchanged: [db-check] => {"ansible_facts": {}, "changed": true, "checksum_dest": null, "checksum_src": "aa78532d520cf2f82ccc587af851596c0d17d08c", "dest": "/opt/mysqldb-check-test/bin/mysql-check", "elapsed": 1, "gid": 1001, "group": "mysqldb-check", "md5sum": "0b5a84cf51fcf79480b4f36b4c88153b", "mode": "0755", "msg": "OK (1818876 bytes)", "owner": "mysqldb-check", "size": 1818876, "src": "/root/.ansible/tmp/ansible-moduletmp-1615682003.18-GIiGyO/tmpU2AQtZ", "state": "file", "status_code": 200, "uid": 1001, "url": "https://playpit-labs-assets.s3-eu-west-1.amazonaws.com/mysql-check/mysql-check"} | |
TASK [mysql_db_check : Copy Users Configuration] ******************************* | |
[0;33mchanged: [db-check] => {"changed": true, "checksum": "3db27709dc597c87ce1e09125a85e2183edc93dc", "dest": "/opt/mysqldb-check-test/config/mysqldb-check.conf", "gid": 1001, "group": "mysqldb-check", "md5sum": "9894289d078651f4a04ad9d69e50a4e1", "mode": "0644", "owner": "mysqldb-check", "size": 9, "src": "/root/.ansible/tmp/ansible_mitogen_action_d4e1dc51f4fa55c9/source", "state": "file", "uid": 1001} | |
TASK [mysql_db_check : Copy mysql-check Service File] ************************** | |
[0;33mchanged: [db-check] => {"changed": true, "checksum": "4bf51c2c012ee39526e3abfe2130c04d762b570d", "dest": "/etc/systemd/system/mysqldb-check.service", "gid": 0, "group": "root", "md5sum": "5fbc8ba3159f0a1dea0648e81cf9e430", "mode": "0644", "owner": "root", "size": 317, "src": "/root/.ansible/tmp/ansible_mitogen_action_8d390dec210481ff/source", "state": "file", "uid": 0} | |
TASK [mysql_db_check : Ensure webapp-server Service Enabled and Running] ******* | |
[0;33mchanged: [db-check] => {"ansible_facts": {}, "changed": true, "enabled": true, "name": "mysqldb-check", "state": "started", "status": {"ActiveEnterTimestampMonotonic": "0", "ActiveExitTimestampMonotonic": "0", "ActiveState": "inactive", "After": "network.target systemd-journald.socket system.slice basic.target", "AllowIsolate": "no", "AmbientCapabilities": "0", "AssertResult": "no", "AssertTimestampMonotonic": "0", "Before": "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": "Simple MySQL DB Checker", "DevicePolicy": "auto", "EnvironmentFile": "/opt/mysqldb-check-test/config/mysqldb-check.conf (ignore_errors=yes)", "ExecMainCode": "0", "ExecMainExitTimestampMonotonic": "0", "ExecMainPID": "0", "ExecMainStartTimestampMonotonic": "0", "ExecMainStatus": "0", "ExecStart": "{ path=/opt/mysqldb-check-test/bin/mysql-check ; argv[]=/opt/mysqldb-check-test/bin/mysql-check ; ignore_errors=no ; start_time=[n/a] ; stop_time=[n/a] ; pid=0 ; code=(null) ; status=0/0 }", "ExecStop": "{ path=/bin/kill ; argv[]=/bin/kill -s QUIT $MAINPID ; ignore_errors=no ; start_time=[n/a] ; stop_time=[n/a] ; pid=0 ; code=(null) ; status=0/0 }", "FailureAction": "none", "FileDescriptorStoreMax": "0", "FragmentPath": "/etc/systemd/system/mysqldb-check.service", "Group": "mysqldb-check", "GuessMainPID": "yes", "IOScheduling": "4", "Id": "mysqldb-check.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": "1048576", "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": "mysqldb-check.service", "NeedDaemonReload": "no", "Nice": "0", "NoNewPrivileges": "no", "NonBlocking": "no", "NotifyAccess": "none", "OOMScoreAdjust": "0", "OnFailureJobMode": "replace", "PermissionsStartOnly": "no", "PrivateDevices": "no", "PrivateNetwork": "no", "PrivateTmp": "no", "ProtectHome": "no", "ProtectSystem": "no", "RefuseManualStart": "no", "RefuseManualStop": "no", "RemainAfterExit": "no", "Requires": "basic.target", "Restart": "no", "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": "1min 30s", "TimeoutStopUSec": "1min 30s", "TimerSlackNSec": "50000", "Transient": "no", "Type": "simple", "UMask": "0022", "UnitFilePreset": "disabled", "UnitFileState": "disabled", "User": "mysqldb-check", "Wants": "system.slice", "WatchdogTimestampMonotonic": "0", "WatchdogUSec": "0"}} | |
RUNNING HANDLER [mysql_db_check : mysql-check restart] ************************* | |
[0;33mchanged: [db-check] => {"ansible_facts": {}, "changed": true, "name": "mysqldb-check", "state": "started", "status": {"ActiveEnterTimestamp": "Sun 2021-03-14 00:33:28 UTC", "ActiveEnterTimestampMonotonic": "359901495086", "ActiveExitTimestampMonotonic": "0", "ActiveState": "active", "After": "systemd-journald.socket system.slice network.target basic.target", "AllowIsolate": "no", "AmbientCapabilities": "0", "AssertResult": "yes", "AssertTimestamp": "Sun 2021-03-14 00:33:28 UTC", "AssertTimestampMonotonic": "359901494094", "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": "Sun 2021-03-14 00:33:28 UTC", "ConditionTimestampMonotonic": "359901494093", "Conflicts": "shutdown.target", "ControlGroup": "/docker/b7d66aeec1c2208dbb399347d81a735bb9f33f09cd27950720451e2ee895f45b/system.slice/mysqldb-check.service", "ControlPID": "0", "DefaultDependencies": "yes", "Delegate": "no", "Description": "Simple MySQL DB Checker", "DevicePolicy": "auto", "EnvironmentFile": "/opt/mysqldb-check-test/config/mysqldb-check.conf (ignore_errors=yes)", "ExecMainCode": "0", "ExecMainExitTimestampMonotonic": "0", "ExecMainPID": "1983", "ExecMainStartTimestamp": "Sun 2021-03-14 00:33:28 UTC", "ExecMainStartTimestampMonotonic": "359901494999", "ExecMainStatus": "0", "ExecStart": "{ path=/opt/mysqldb-check-test/bin/mysql-check ; argv[]=/opt/mysqldb-check-test/bin/mysql-check ; ignore_errors=no ; start_time=[Sun 2021-03-14 00:33:28 UTC] ; stop_time=[n/a] ; pid=1983 ; code=(null) ; status=0/0 }", "ExecStop": "{ path=/bin/kill ; argv[]=/bin/kill -s QUIT $MAINPID ; ignore_errors=no ; start_time=[n/a] ; stop_time=[n/a] ; pid=0 ; code=(null) ; status=0/0 }", "FailureAction": "none", "FileDescriptorStoreMax": "0", "FragmentPath": "/etc/systemd/system/mysqldb-check.service", "Group": "mysqldb-check", "GuessMainPID": "yes", "IOScheduling": "4", "Id": "mysqldb-check.service", "IgnoreOnIsolate": "no", "IgnoreOnSnapshot": "no", "IgnoreSIGPIPE": "yes", "InactiveEnterTimestampMonotonic": "0", "InactiveExitTimestamp": "Sun 2021-03-14 00:33:28 UTC", "InactiveExitTimestampMonotonic": "359901495086", "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": "1048576", "LimitNPROC": "18446744073709551615", "LimitRSS": "18446744073709551615", "LimitRTPRIO": "0", "LimitRTTIME": "18446744073709551615", "LimitSIGPENDING": "29790", "LimitSTACK": "18446744073709551615", "LoadState": "loaded", "MainPID": "1983", "MemoryAccounting": "no", "MemoryCurrent": "18446744073709551615", "MemoryLimit": "18446744073709551615", "MountFlags": "0", "Names": "mysqldb-check.service", "NeedDaemonReload": "no", "Nice": "0", "NoNewPrivileges": "no", "NonBlocking": "no", "NotifyAccess": "none", "OOMScoreAdjust": "0", "OnFailureJobMode": "replace", "PermissionsStartOnly": "no", "PrivateDevices": "no", "PrivateNetwork": "no", "PrivateTmp": "no", "ProtectHome": "no", "ProtectSystem": "no", "RefuseManualStart": "no", "RefuseManualStop": "no", "RemainAfterExit": "no", "Requires": "basic.target", "Restart": "no", "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": "running", "SyslogLevelPrefix": "yes", "SyslogPriority": "30", "SystemCallErrorNumber": "0", "TTYReset": "no", "TTYVHangup": "no", "TTYVTDisallocate": "no", "TasksAccounting": "no", "TasksCurrent": "18446744073709551615", "TasksMax": "18446744073709551615", "TimeoutStartUSec": "1min 30s", "TimeoutStopUSec": "1min 30s", "TimerSlackNSec": "50000", "Transient": "no", "Type": "simple", "UMask": "0022", "UnitFilePreset": "disabled", "UnitFileState": "enabled", "User": "mysqldb-check", "WantedBy": "multi-user.target", "Wants": "system.slice", "WatchdogTimestamp": "Sun 2021-03-14 00:33:28 UTC", "WatchdogTimestampMonotonic": "359901495052", "WatchdogUSec": "0"}} | |
PLAY RECAP ********************************************************************* | |
[0;33mdb-check : [0;32mok=8 [0;33mchanged=8 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0 | |
* 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/14 00:33:51 ✓ [2.3 MySQL DB Check] => trying another application user (1), 21.901s | |
2021/03/14 00:34:03 ✗ [2.3 MySQL DB Check] -> trying another application group | |
2021/03/14 00:34:03 Result: exit status 2 | |
2021/03/14 00:34:03 Output: | |
db-check | |
8a412212d228803b3c630a216dd00885ebe971889237cec264fe622735bac01d | |
[0;34mNo config file found; using defaults | |
PLAY [db-check] **************************************************************** | |
TASK [user : Create user group] ************************************************ | |
[0;33mchanged: [db-check] => {"ansible_facts": {"discovered_interpreter_python": "/usr/bin/python"}, "changed": true, "gid": 1001, "name": "mysqldb-check", "state": "present", "system": false} | |
TASK [user : Create user] ****************************************************** | |
[0;33mchanged: [db-check] => {"ansible_facts": {}, "changed": true, "comment": "", "create_home": true, "group": 1001, "home": "/home/mysqldb-check", "name": "mysqldb-check", "shell": "/bin/sh", "state": "present", "system": false, "uid": 1001} | |
TASK [mysql_db_check : Create app folders] ************************************* | |
[0;31mfailed: [db-check] (item=bin) => {"ansible_facts": {}, "ansible_loop_var": "item", "changed": false, "gid": 0, "group": "root", "item": "bin", "mode": "0755", "msg": "chgrp failed: failed to look up group mysqldb-check-test", "owner": "mysqldb-check", "path": "/opt/mysqldb-check", "size": 4096, "state": "directory", "uid": 1001} | |
[0;31mfailed: [db-check] (item=config) => {"ansible_loop_var": "item", "changed": false, "gid": 0, "group": "root", "item": "config", "mode": "0755", "msg": "chgrp failed: failed to look up group mysqldb-check-test", "owner": "mysqldb-check", "path": "/opt/mysqldb-check/config", "size": 4096, "state": "directory", "uid": 1001} | |
PLAY RECAP ********************************************************************* | |
[0;31mdb-check : [0;32mok=2 [0;33mchanged=2 unreachable=0 [0;31mfailed=1 skipped=0 rescued=0 ignored=0 | |
2021/03/14 00:34:23 ✓ [2.3 MySQL DB Check] => rollout (Not ROOT) (1), 20.006s | |
2021/03/14 00:34:35 ✓ [2.3 MySQL DB Check] => idempotency check (Not ROOT) (1), 12.427s | |
2021/03/14 00:34:36 ----------------------------------------------------------------------------------- | |
2021/03/14 00:34:36 Tests Summary: | |
2021/03/14 00:34:36 14 (of 16) tests passed, 2 tests failed; rated as 87.50% | |
2021/03/14 00:34:36 | |
2021/03/14 00:34:36 Time Spent: 3m1.561s | |
2021/03/14 00:34:36 ----------------------------------------------------------------------------------- |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment