-
-
Save sbeliakou/8c79db1c168ce6e6d7d9491f1823aec6 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 'sergey_kosolapov'... | |
name: sergey_kosolapov, master/4ad3fb3 @ 2021-03-13 11:43:41 +0000 | |
2021/03/13 23:13:03 config: tests/encryption.yml | |
2021/03/13 23:13:03 verbosity: 2 | |
2021/03/13 23:13:03 ----------------------------------------------------------------------------------- | |
2021/03/13 23:13:03 Running '2.1 Working with Secrets', 1..8 tests | |
2021/03/13 23:13:03 ----------------------------------------------------------------------------------- | |
2021/03/13 23:13:03 ✗ [2.1 Working with Secrets] -> 'spoiler1' decrypted correctly | |
2021/03/13 23:13:03 Result: exit status 1 | |
2021/03/13 23:13:03 Output: | |
2021/03/13 23:13:03 ✓ [2.1 Working with Secrets] => 'spoiler2' decrypted correctly (1), 17ms | |
2021/03/13 23:13:03 ✓ [2.1 Working with Secrets] => 'spoiler3' decrypted correctly (1), 20ms | |
2021/03/13 23:13:03 ✓ [2.1 Working with Secrets] => 'spoiler4' decrypted correctly (1), 28ms | |
2021/03/13 23:13:05 ✓ [2.1 Working with Secrets] => 'secret1' encrypted with tag=dev (v1.2/AES256) (1), 27ms | |
2021/03/13 23:13:05 ✓ [2.1 Working with Secrets] => 'secret2' encrypted with tag=test (v1.2/AES256) (1), 24ms | |
2021/03/13 23:13:05 ✓ [2.1 Working with Secrets] => 'secret3' encrypted with tag=stage (v1.2/AES256) (1), 21ms | |
2021/03/13 23:13:05 ✓ [2.1 Working with Secrets] => 'secret4' encrypted with tag=prod (v1.2/AES256) (1), 30ms | |
2021/03/13 23:13:05 ----------------------------------------------------------------------------------- | |
2021/03/13 23:13:05 Tests Summary: | |
2021/03/13 23:13:05 7 (of 8) tests passed, 1 tests failed; rated as 87.50% | |
2021/03/13 23:13:05 | |
2021/03/13 23:13:05 Time Spent: 2.106s | |
2021/03/13 23:13:05 ----------------------------------------------------------------------------------- | |
name: sergey_kosolapov, master/4ad3fb3 @ 2021-03-13 11:43:41 +0000 | |
2021/03/13 23:13:05 config: tests/role-deps.yml | |
2021/03/13 23:13:05 verbosity: 2 | |
2021/03/13 23:13:05 ----------------------------------------------------------------------------------- | |
2021/03/13 23:13:05 Running '2.2 Role Dependencies', 1..17 tests | |
2021/03/13 23:13:05 ----------------------------------------------------------------------------------- | |
2021/03/13 23:13:09 ✗ [2.2 Role Dependencies] -> 'base' linter | |
2021/03/13 23:13:09 Result: exit status 2 | |
2021/03/13 23:13:09 Output: | |
Added ANSIBLE_ROLES_PATH=~/.ansible/roles:/usr/share/ansible/roles:/etc/ansible/roles:roles | |
WARNING Listing 1 violation(s) that are fatal | |
unnamed-task: All tasks should be named | |
roles/base/tasks/main.yml:3 Task/Handler: debug msg=running base role | |
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 | |
- unnamed-task # All tasks should be named | |
Finished with [1;34m1 failure(s), [1;34m0 warning(s) on [1;34m8 files. | |
2021/03/13 23:13:13 ✗ [2.2 Role Dependencies] -> 'java' linter | |
2021/03/13 23:13:13 Result: exit status 2 | |
2021/03/13 23:13:13 Output: | |
Added ANSIBLE_ROLES_PATH=~/.ansible/roles:/usr/share/ansible/roles:/etc/ansible/roles:roles | |
WARNING Listing 1 violation(s) that are fatal | |
unnamed-task: All tasks should be named | |
roles/java/tasks/main.yml:4 Task/Handler: debug msg=running java role | |
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 | |
- unnamed-task # All tasks should be named | |
Finished with [1;34m1 failure(s), [1;34m0 warning(s) on [1;34m8 files. | |
2021/03/13 23:13:17 ✗ [2.2 Role Dependencies] -> 'tomcat' linter | |
2021/03/13 23:13:17 Result: exit status 2 | |
2021/03/13 23:13:17 Output: | |
Added ANSIBLE_ROLES_PATH=~/.ansible/roles:/usr/share/ansible/roles:/etc/ansible/roles:roles | |
WARNING Listing 1 violation(s) that are fatal | |
unnamed-task: All tasks should be named | |
roles/tomcat/tasks/main.yml:4 Task/Handler: debug msg=running tomcat role | |
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 | |
- unnamed-task # All tasks should be named | |
Finished with [1;34m1 failure(s), [1;34m0 warning(s) on [1;34m7 files. | |
2021/03/13 23:13:20 ✗ [2.2 Role Dependencies] -> 'nginx-base' linter | |
2021/03/13 23:13:20 Result: exit status 2 | |
2021/03/13 23:13:20 Output: | |
Added ANSIBLE_ROLES_PATH=~/.ansible/roles:/usr/share/ansible/roles:/etc/ansible/roles:roles | |
WARNING Listing 1 violation(s) that are fatal | |
unnamed-task: All tasks should be named | |
roles/nginx-base/tasks/main.yml:3 Task/Handler: debug msg=running nginx-custom role | |
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 | |
- unnamed-task # All tasks should be named | |
Finished with [1;34m1 failure(s), [1;34m0 warning(s) on [1;34m8 files. | |
2021/03/13 23:13:23 ✗ [2.2 Role Dependencies] -> 'nginx-custom' linter | |
2021/03/13 23:13:23 Result: exit status 2 | |
2021/03/13 23:13:23 Output: | |
Added ANSIBLE_ROLES_PATH=~/.ansible/roles:/usr/share/ansible/roles:/etc/ansible/roles:roles | |
WARNING Listing 2 violation(s) that are fatal | |
meta-no-tags: Tags must be strings: 'AnsibleMapping([('debug', 'msg="running base role"'), ('__line__', 43), ('__file__', PosixPath('roles/nginx-custom/meta/main.yml'))])' | |
:0 | |
unnamed-task: All tasks should be named | |
roles/nginx-custom/tasks/main.yml:3 Task/Handler: debug msg=running nginx-custom role | |
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 | |
- meta-no-tags # Tags must contain lowercase letters and digits only | |
- unnamed-task # All tasks should be named | |
Finished with [1;34m2 failure(s), [1;34m0 warning(s) on [1;34m8 files. | |
2021/03/13 23:13:26 ✗ [2.2 Role Dependencies] -> 'user' linter | |
2021/03/13 23:13:26 Result: exit status 2 | |
2021/03/13 23:13:26 Output: | |
Added ANSIBLE_ROLES_PATH=~/.ansible/roles:/usr/share/ansible/roles:/etc/ansible/roles:roles | |
WARNING Listing 1 violation(s) that are fatal | |
unnamed-task: All tasks should be named | |
roles/user/tasks/main.yml:3 Task/Handler: debug msg=running user role | |
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 | |
- unnamed-task # All tasks should be named | |
Finished with [1;34m1 failure(s), [1;34m0 warning(s) on [1;34m8 files. | |
2021/03/13 23:13:26 ✓ [2.2 Role Dependencies] => 'tomcat' role depends on 'java' role (1), 6ms | |
2021/03/13 23:13:26 ✓ [2.2 Role Dependencies] => 'tomcat' role calls 'java' role with 'java_version' parameter (1), 9ms | |
2021/03/13 23:13:26 ✓ [2.2 Role Dependencies] => 'tomcat' role depends on 'user' role (1), 8ms | |
2021/03/13 23:13:26 ✓ [2.2 Role Dependencies] => 'tomcat' role calls 'user' role with 'user_name' parameter (1), 8ms | |
2021/03/13 23:13:26 ✓ [2.2 Role Dependencies] => 'tomcat' role calls 'user' role with 'user_id' parameter (1), 9ms | |
2021/03/13 23:13:26 ✓ [2.2 Role Dependencies] => 'tomcat' role calls 'user' role with 'group_id' parameter (1), 10ms | |
2021/03/13 23:13:26 ✓ [2.2 Role Dependencies] => 'tomcat' role calls 'user' role with 'user_home' parameter (1), 8ms | |
2021/03/13 23:13:26 ✓ [2.2 Role Dependencies] => 'tomcat' role depends on 'base' role (1), 10ms | |
2021/03/13 23:13:26 ✓ [2.2 Role Dependencies] => 'java' role depends on 'base' role (1), 8ms | |
2021/03/13 23:13:26 ✓ [2.2 Role Dependencies] => 'nginx-base' role depends on 'base' role (1), 8ms | |
2021/03/13 23:13:26 ✓ [2.2 Role Dependencies] => 'nginx-custom' role depends on 'nginx-base' role (1), 10ms | |
2021/03/13 23:13:26 ----------------------------------------------------------------------------------- | |
2021/03/13 23:13:26 Tests Summary: | |
2021/03/13 23:13:26 11 (of 17) tests passed, 6 tests failed; rated as 64.71% | |
2021/03/13 23:13:26 | |
2021/03/13 23:13:26 Time Spent: 20.359s | |
2021/03/13 23:13:26 ----------------------------------------------------------------------------------- | |
name: sergey_kosolapov, master/4ad3fb3 @ 2021-03-13 11:43:41 +0000 | |
2021/03/13 23:13:26 config: tests/base.yml | |
2021/03/13 23:13:26 verbosity: 2 | |
2021/03/13 23:13:26 ----------------------------------------------------------------------------------- | |
2021/03/13 23:13:26 Running '2.3 Base Role (centos 7)', 1..11 tests | |
2021/03/13 23:13:26 ----------------------------------------------------------------------------------- | |
2021/03/13 23:13:33 ✓ [2.3 Base Role (centos 7)] => Role Linter (1), 4.549s | |
2021/03/13 23:13:34 ✓ [2.3 Base Role (centos 7)] => playbook syntax check (1), 890ms | |
2021/03/13 23:13:59 ✓ [2.3 Base Role (centos 7)] => apply role (5), 24.771s | |
2021/03/13 23:14:05 ✓ [2.3 Base Role (centos 7)] => idempotence check (apply the role twice) (5), 6.285s | |
2021/03/13 23:14:05 ✓ [2.3 Base Role (centos 7)] => role installs 'epel' repo (1), 21ms | |
2021/03/13 23:14:05 ✓ [2.3 Base Role (centos 7)] => role installs 'curl' package (1), 40ms | |
2021/03/13 23:14:05 ✓ [2.3 Base Role (centos 7)] => role installs 'wget' package (1), 51ms | |
2021/03/13 23:14:05 ✓ [2.3 Base Role (centos 7)] => role installs 'sudo' package (1), 15ms | |
2021/03/13 23:14:05 ✓ [2.3 Base Role (centos 7)] => role installs 'iproute' package (1), 12ms | |
2021/03/13 23:14:05 ✓ [2.3 Base Role (centos 7)] => role installs 'python-pip' package (1), 9ms | |
2021/03/13 23:14:05 ✓ [2.3 Base Role (centos 7)] => role creates ansible facts folder (1), 184ms | |
2021/03/13 23:14:06 ----------------------------------------------------------------------------------- | |
2021/03/13 23:14:06 Tests Summary: | |
2021/03/13 23:14:06 11 (of 11) tests passed, 0 tests failed; rated as 100.00% | |
2021/03/13 23:14:06 | |
2021/03/13 23:14:06 Time Spent: 40.292s | |
2021/03/13 23:14:06 ----------------------------------------------------------------------------------- | |
name: sergey_kosolapov, master/4ad3fb3 @ 2021-03-13 11:43:41 +0000 | |
2021/03/13 23:14:06 config: tests/user.yml | |
2021/03/13 23:14:06 verbosity: 2 | |
2021/03/13 23:14:06 ----------------------------------------------------------------------------------- | |
2021/03/13 23:14:06 Running '2.3 User Role (CentOS 7)', 1..17 tests | |
2021/03/13 23:14:06 ----------------------------------------------------------------------------------- | |
2021/03/13 23:14:13 ✓ [2.3 User Role (CentOS 7)] => Role Linter (1), 5.125s | |
2021/03/13 23:14:14 ✓ [2.3 User Role (CentOS 7)] => playbook syntax check (1), 1.311s | |
2021/03/13 23:14:40 ✓ [2.3 User Role (CentOS 7)] => apply role (5), 23.918s | |
2021/03/13 23:14:56 ✓ [2.3 User Role (CentOS 7)] => idempotence check (apply role twice) (5), 15.656s | |
2021/03/13 23:14:56 ✓ [2.3 User Role (CentOS 7)] => use "user_name" varaible (1), 162ms | |
2021/03/13 23:14:56 ✓ [2.3 User Role (CentOS 7)] => use "user_name", "user_group" variables (1), 176ms | |
2021/03/13 23:14:56 ✗ [2.3 User Role (CentOS 7)] -> use "user_name", "user_id", "user_group" variables | |
2021/03/13 23:14:56 Result: exit status 1 | |
2021/03/13 23:14:56 Output: | |
2021/03/13 23:14:56 ✓ [2.3 User Role (CentOS 7)] => use "user_name", "user_id", "user_group", "user_gid" variables (1), 174ms | |
2021/03/13 23:14:57 ✓ [2.3 User Role (CentOS 7)] => use "user_home" variable (1), 173ms | |
2021/03/13 23:14:57 ✓ [2.3 User Role (CentOS 7)] => set correct home permissions (1), 282ms | |
2021/03/13 23:14:57 ✓ [2.3 User Role (CentOS 7)] => user owns its home directory (1), 220ms | |
2021/03/13 23:14:57 ✓ [2.3 User Role (CentOS 7)] => use "user_name" from play vars (1), 165ms | |
2021/03/13 23:14:58 ✓ [2.3 User Role (CentOS 7)] => doesn't create home dir if required (1), 339ms | |
2021/03/13 23:14:58 ✓ [2.3 User Role (CentOS 7)] => use "user_shell" variable (1), 208ms | |
2021/03/13 23:14:58 ✓ [2.3 User Role (CentOS 7)] => setting custom sudo priviliges (1), 220ms | |
2021/03/13 23:14:58 ✓ [2.3 User Role (CentOS 7)] => doesn't create sudo priviliges for all users (1), 196ms | |
2021/03/13 23:14:58 ✗ [2.3 User Role (CentOS 7)] -> setting custom sudo priviliges - checking validation parameter | |
2021/03/13 23:14:58 Result: exit status 1 | |
2021/03/13 23:14:58 Output: | |
2021/03/13 23:15:00 ----------------------------------------------------------------------------------- | |
2021/03/13 23:15:00 Tests Summary: | |
2021/03/13 23:15:00 15 (of 17) tests passed, 2 tests failed; rated as 92.00% | |
2021/03/13 23:15:00 | |
2021/03/13 23:15:00 Time Spent: 54.224s | |
2021/03/13 23:15:00 ----------------------------------------------------------------------------------- | |
name: sergey_kosolapov, master/4ad3fb3 @ 2021-03-13 11:43:41 +0000 | |
2021/03/13 23:15:00 config: tests/webapp-server.yml | |
2021/03/13 23:15:00 verbosity: 2 | |
2021/03/13 23:15:00 ----------------------------------------------------------------------------------- | |
2021/03/13 23:15:00 Running '2.3 WebApp-Server Role (centos 7)', 1..17 tests | |
2021/03/13 23:15:00 ----------------------------------------------------------------------------------- | |
2021/03/13 23:15:08 ✓ [2.3 WebApp-Server Role (centos 7)] => role linter (1), 5.371s | |
2021/03/13 23:15:09 ✓ [2.3 WebApp-Server Role (centos 7)] => playbook syntax check (1), 1.067s | |
2021/03/13 23:15:54 ✓ [2.3 WebApp-Server Role (centos 7)] => apply role (5), 45.231s | |
2021/03/13 23:16:14 ✓ [2.3 WebApp-Server Role (centos 7)] => idempotence check (apply the role twice) (5), 19.78s | |
2021/03/13 23:16:14 ✓ [2.3 WebApp-Server Role (centos 7)] => role depends on 'user' role (1), 8ms | |
2021/03/13 23:16:14 ✓ [2.3 WebApp-Server Role (centos 7)] => passing variables to 'user' role: 'webapp_server_user' (1), 8ms | |
2021/03/13 23:16:14 ✓ [2.3 WebApp-Server Role (centos 7)] => passing variables to 'user' role: 'webapp_server_group' (1), 7ms | |
2021/03/13 23:16:14 ✓ [2.3 WebApp-Server Role (centos 7)] => service responds 200 (1), 161ms | |
2021/03/13 23:16:14 ✓ [2.3 WebApp-Server Role (centos 7)] => service is enabled (1), 208ms | |
2021/03/13 23:16:15 ✓ [2.3 WebApp-Server Role (centos 7)] => service runs under proper user/group (1), 400ms | |
2021/03/13 23:16:15 ✓ [2.3 WebApp-Server Role (centos 7)] => application user has no password set (1), 151ms | |
2021/03/13 23:16:30 ✗ [2.3 WebApp-Server Role (centos 7)] -> stress-test: updating server application | |
2021/03/13 23:16:30 Result: exit status 1 | |
2021/03/13 23:16:30 Output: | |
[0;34mNo config file found; using defaults | |
PLAY [all] ********************************************************************* | |
TASK [Gathering Facts] ********************************************************* | |
[0;32mok: [default] | |
TASK [base : install epel] ***************************************************** | |
[0;32mok: [default] => {"ansible_facts": {}, "changed": false, "msg": "", "rc": 0, "results": ["epel-release-7-11.noarch providing epel-release is already installed"]} | |
TASK [base : install soft] ***************************************************** | |
[0;32mok: [default] => {"ansible_facts": {}, "changed": false, "msg": "", "rc": 0, "results": ["python-devel-2.7.5-90.el7.x86_64 providing python-devel is already installed", "python2-pip-8.1.2-8.el7.noarch providing python-pip is already installed", "curl-7.29.0-51.el7.x86_64 providing curl is already installed", "wget-1.14-18.el7_6.1.x86_64 providing wget is already installed", "iproute-4.11.0-14.el7.x86_64 providing iproute is already installed", "sudo-1.8.23-3.el7.x86_64 providing sudo is already installed"]} | |
TASK [base : Ensure directory for ansible facts exists] ************************ | |
[0;32mok: [default] => {"ansible_facts": {}, "changed": false, "gid": 0, "group": "root", "mode": "0755", "owner": "root", "path": "/etc/ansible/facts.d/", "size": 4096, "state": "directory", "uid": 0} | |
TASK [user : Create {{ group_name }} Group] ************************************ | |
[0;32mok: [default] => {"ansible_facts": {}, "changed": false, "gid": 1001, "name": "webapp_server", "state": "present", "system": false} | |
TASK [user : Add user "webapp_server"] ***************************************** | |
[0;32mok: [default] => {"ansible_facts": {}, "append": false, "changed": false, "comment": "", "group": 1001, "home": "/home/webapp_server", "move_home": false, "name": "webapp_server", "shell": "/bin/sh", "state": "present", "uid": 1001} | |
TASK [user : Allow specified users to sudo] ************************************ | |
[0;36mskipping: [default] => {"changed": false, "skip_reason": "Conditional result was False"} | |
TASK [webapp-server : Create a directory /opt/webapp-server/bin/ if it does not exist] *** | |
[0;32mok: [default] => {"ansible_facts": {}, "changed": false, "gid": 1001, "group": "webapp_server", "mode": "0755", "owner": "webapp_server", "path": "/opt/webapp-server/bin", "size": 4096, "state": "directory", "uid": 1001} | |
TASK [webapp-server : Create a directory /opt/webapp-server/conf/ if it does not exist] *** | |
[0;32mok: [default] => {"ansible_facts": {}, "changed": false, "gid": 1001, "group": "webapp_server", "mode": "0755", "owner": "webapp_server", "path": "/opt/webapp-server/conf", "size": 4096, "state": "directory", "uid": 1001} | |
TASK [webapp-server : Download WebApp] ***************************************** | |
[0;32mok: [default] => {"ansible_facts": {}, "changed": false, "checksum_dest": "28f105a4ed1478f27001141888cb86efc7ace7aa", "checksum_src": "28f105a4ed1478f27001141888cb86efc7ace7aa", "dest": "/opt/webapp-server/bin/webapp-server", "elapsed": 1, "gid": 1001, "group": "webapp_server", "md5sum": "66e5a7366408e9db471e3e9586e01708", "mode": "0744", "msg": "OK (6213632 bytes)", "owner": "webapp_server", "size": 6213632, "src": "/root/.ansible/tmp/ansible-moduletmp-1615677384.93-oVUxpT/tmpUvUVdK", "state": "file", "status_code": 200, "uid": 1001, "url": "https://playpit-labs-assets.s3-eu-west-1.amazonaws.com/webapp-server/webapp-server"} | |
TASK [webapp-server : Copy Configuration File] ********************************* | |
[0;32mok: [default] => {"changed": false, "checksum": "84e85a0d5c8e938f6082b010e3e7ba8b3cd07190", "dest": "/opt/webapp-server/conf/webapp-server.conf", "gid": 1001, "group": "webapp_server", "mode": "0644", "owner": "webapp_server", "path": "/opt/webapp-server/conf/webapp-server.conf", "size": 162, "state": "file", "uid": 1001} | |
TASK [webapp-server : Copy WebApp Service File] ******************************** | |
[0;32mok: [default] => {"changed": false, "checksum": "4120de07850aa0d7fd1151a92bbfb13ddd378639", "dest": "/usr/lib/systemd/system/webapp-server.service", "gid": 0, "group": "root", "mode": "0644", "owner": "root", "path": "/usr/lib/systemd/system/webapp-server.service", "size": 304, "state": "file", "uid": 0} | |
TASK [webapp-server : Enable and start WebApp service] ************************* | |
[0;32mok: [default] => {"ansible_facts": {}, "changed": false, "enabled": true, "name": "webapp-server", "state": "started", "status": {"ActiveEnterTimestamp": "Sat 2021-03-13 23:15:54 UTC", "ActiveEnterTimestampMonotonic": "355247650135", "ActiveExitTimestamp": "Sat 2021-03-13 23:15:54 UTC", "ActiveExitTimestampMonotonic": "355247643536", "ActiveState": "active", "After": "basic.target system.slice network.target systemd-journald.socket", "AllowIsolate": "no", "AmbientCapabilities": "0", "AssertResult": "yes", "AssertTimestamp": "Sat 2021-03-13 23:15:54 UTC", "AssertTimestampMonotonic": "355247649021", "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 23:15:54 UTC", "ConditionTimestampMonotonic": "355247649021", "Conflicts": "shutdown.target", "ControlGroup": "/docker/0c9561aca3f509c066ffa089112b0d9c82baf8c3e027295bd767b408e61a99fe/system.slice/webapp-server.service", "ControlPID": "0", "DefaultDependencies": "yes", "Delegate": "no", "Description": "Simple WebApp Server", "DevicePolicy": "auto", "EnvironmentFile": "/opt/webapp-server/conf/webapp-server.conf (ignore_errors=yes)", "ExecMainCode": "0", "ExecMainExitTimestampMonotonic": "0", "ExecMainPID": "3934", "ExecMainStartTimestamp": "Sat 2021-03-13 23:15:54 UTC", "ExecMainStartTimestampMonotonic": "355247650046", "ExecMainStatus": "0", "ExecStart": "{ path=/opt/webapp-server/bin/webapp-server ; argv[]=/opt/webapp-server/bin/webapp-server ; ignore_errors=no ; start_time=[Sat 2021-03-13 23:15:54 UTC] ; stop_time=[n/a] ; pid=3934 ; code=(null) ; status=0/0 }", "ExecStop": "{ path=/bin/kill ; argv[]=/bin/kill -s QUIT $MAINPID ; ignore_errors=no ; start_time=[Sat 2021-03-13 23:15:54 UTC] ; stop_time=[Sat 2021-03-13 23:15:54 UTC] ; pid=3933 ; code=exited ; status=0 }", "FailureAction": "none", "FileDescriptorStoreMax": "0", "FragmentPath": "/usr/lib/systemd/system/webapp-server.service", "Group": "webapp_server", "GuessMainPID": "yes", "IOScheduling": "4", "Id": "webapp-server.service", "IgnoreOnIsolate": "no", "IgnoreOnSnapshot": "no", "IgnoreSIGPIPE": "yes", "InactiveEnterTimestamp": "Sat 2021-03-13 23:15:54 UTC", "InactiveEnterTimestampMonotonic": "355247648535", "InactiveExitTimestamp": "Sat 2021-03-13 23:15:54 UTC", "InactiveExitTimestampMonotonic": "355247650135", "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": "3934", "MemoryAccounting": "no", "MemoryCurrent": "18446744073709551615", "MemoryLimit": "18446744073709551615", "MountFlags": "0", "Names": "webapp-server.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": "webapp_server", "WantedBy": "multi-user.target", "Wants": "system.slice", "WatchdogTimestamp": "Sat 2021-03-13 23:15:54 UTC", "WatchdogTimestampMonotonic": "355247650098", "WatchdogUSec": "0"}} | |
TASK [webapp-server : Wait for start] ****************************************** | |
[0;32mok: [default] => {"ansible_facts": {}, "changed": false, "elapsed": 0, "match_groupdict": {}, "match_groups": [], "path": null, "port": 8080, "search_regex": null, "state": "started"} | |
PLAY RECAP ********************************************************************* | |
[0;32mdefault : [0;32mok=13 changed=0 unreachable=0 failed=0 [0;36mskipped=1 rescued=0 ignored=0 | |
* About to connect() to localhost port 8080 (#0) | |
* Trying 127.0.0.1... | |
* Connected to localhost (127.0.0.1) port 8080 (#0) | |
> GET / HTTP/1.1 | |
> User-Agent: curl/7.29.0 | |
> Host: localhost:8080 | |
> Accept: */* | |
> | |
< HTTP/1.1 200 OK | |
< Expires: 0 | |
< Pragma: no-cache | |
< Date: Sat, 13 Mar 2021 23:16:30 GMT | |
< Content-Length: 195 | |
< Content-Type: text/plain; charset=utf-8 | |
< | |
{ [data not shown] | |
* Connection #0 to host localhost left intact | |
2021/03/13 23:17:12 ✗ [2.3 WebApp-Server Role (centos 7)] -> stress-test: changing application port | |
2021/03/13 23:17:12 Result: exit status 1 | |
2021/03/13 23:17:12 Output: | |
centos7 | |
faf3bf84f8181cd82c1f339e909726fde14ad73beb2636da46ec4153ea3cd266 | |
[0;34mNo config file found; using defaults | |
PLAY [all] ********************************************************************* | |
TASK [Gathering Facts] ********************************************************* | |
[0;32mok: [default] | |
TASK [base : install epel] ***************************************************** | |
[0;32mok: [default] => {"ansible_facts": {}, "changed": false, "msg": "", "rc": 0, "results": ["epel-release-7-11.noarch providing epel-release is already installed"]} | |
TASK [base : install soft] ***************************************************** | |
[0;33mchanged: [default] => {"ansible_facts": {}, "changed": true, "changes": {"installed": ["python-devel", "wget"]}, "msg": "", "rc": 0, "results": ["python2-pip-8.1.2-8.el7.noarch providing python-pip is already installed", "curl-7.29.0-51.el7.x86_64 providing curl is already installed", "iproute-4.11.0-14.el7.x86_64 providing iproute is already installed", "sudo-1.8.23-3.el7.x86_64 providing sudo is already installed", "Loaded plugins: fastestmirror, ovl\nDetermining fastest mirrors\n * base: mirror.datacenter.by\n * epel: mirror.datacenter.by\n * extras: mirror.datacenter.by\n * updates: mirror.datacenter.by\nResolving Dependencies\n--> Running transaction check\n---> Package python-devel.x86_64 0:2.7.5-90.el7 will be installed\n--> Processing Dependency: python(x86-64) = 2.7.5-90.el7 for package: python-devel-2.7.5-90.el7.x86_64\n--> Processing Dependency: python2-rpm-macros > 3-30 for package: python-devel-2.7.5-90.el7.x86_64\n--> Processing Dependency: python-rpm-macros > 3-30 for package: python-devel-2.7.5-90.el7.x86_64\n---> Package wget.x86_64 0:1.14-18.el7_6.1 will be installed\n--> Running transaction check\n---> Package python.x86_64 0:2.7.5-77.el7_6 will be updated\n---> Package python.x86_64 0:2.7.5-90.el7 will be an update\n--> Processing Dependency: python-libs(x86-64) = 2.7.5-90.el7 for package: python-2.7.5-90.el7.x86_64\n---> Package python-rpm-macros.noarch 0:3-34.el7 will be installed\n--> Processing Dependency: python-srpm-macros for package: python-rpm-macros-3-34.el7.noarch\n---> Package python2-rpm-macros.noarch 0:3-34.el7 will be installed\n--> Running transaction check\n---> Package python-libs.x86_64 0:2.7.5-77.el7_6 will be updated\n---> Package python-libs.x86_64 0:2.7.5-90.el7 will be an update\n---> Package python-srpm-macros.noarch 0:3-34.el7 will be installed\n--> Finished Dependency Resolution\n\nDependencies Resolved\n\n================================================================================\n Package Arch Version Repository Size\n================================================================================\nInstalling:\n python-devel x86_64 2.7.5-90.el7 updates 399 k\n wget x86_64 1.14-18.el7_6.1 base 547 k\nInstalling for dependencies:\n python-rpm-macros noarch 3-34.el7 base 9.1 k\n python-srpm-macros noarch 3-34.el7 base 8.8 k\n python2-rpm-macros noarch 3-34.el7 base 8.1 k\nUpdating for dependencies:\n python x86_64 2.7.5-90.el7 updates 96 k\n python-libs x86_64 2.7.5-90.el7 updates 5.6 M\n\nTransaction Summary\n================================================================================\nInstall 2 Packages (+3 Dependent packages)\nUpgrade ( 2 Dependent packages)\n\nTotal download size: 6.7 M\nDownloading packages:\nNo Presto metadata available for updates\n--------------------------------------------------------------------------------\nTotal 12 MB/s | 6.7 MB 00:00 \nRunning transaction check\nRunning transaction test\nTransaction test succeeded\nRunning transaction\n Updating : python-libs-2.7.5-90.el7.x86_64 1/9 \n Updating : python-2.7.5-90.el7.x86_64 2/9 \n Installing : python-srpm-macros-3-34.el7.noarch 3/9 \n Installing : python-rpm-macros-3-34.el7.noarch 4/9 \n Installing : python2-rpm-macros-3-34.el7.noarch 5/9 \n Installing : python-devel-2.7.5-90.el7.x86_64 6/9 \n Installing : wget-1.14-18.el7_6.1.x86_64 7/9 \ninstall-info: No such file or directory for /usr/share/info/wget.info.gz\n Cleanup : python-2.7.5-77.el7_6.x86_64 8/9 \n Cleanup : python-libs-2.7.5-77.el7_6.x86_64 9/9 \n Verifying : python2-rpm-macros-3-34.el7.noarch 1/9 \n Verifying : python-libs-2.7.5-90.el7.x86_64 2/9 \n Verifying : python-devel-2.7.5-90.el7.x86_64 3/9 \n Verifying : python-2.7.5-90.el7.x86_64 4/9 \n Verifying : python-rpm-macros-3-34.el7.noarch 5/9 \n Verifying : wget-1.14-18.el7_6.1.x86_64 6/9 \n Verifying : python-srpm-macros-3-34.el7.noarch 7/9 \n Verifying : python-2.7.5-77.el7_6.x86_64 8/9 \n Verifying : python-libs-2.7.5-77.el7_6.x86_64 9/9 \n\nInstalled:\n python-devel.x86_64 0:2.7.5-90.el7 wget.x86_64 0:1.14-18.el7_6.1 \n\nDependency Installed:\n python-rpm-macros.noarch 0:3-34.el7 python-srpm-macros.noarch 0:3-34.el7 \n python2-rpm-macros.noarch 0:3-34.el7 \n\nDependency Updated:\n python.x86_64 0:2.7.5-90.el7 python-libs.x86_64 0:2.7.5-90.el7 \n\nComplete!\n"]} | |
TASK [base : Ensure directory for ansible facts exists] ************************ | |
[0;33mchanged: [default] => {"ansible_facts": {}, "changed": true, "gid": 0, "group": "root", "mode": "0755", "owner": "root", "path": "/etc/ansible/facts.d/", "size": 4096, "state": "directory", "uid": 0} | |
TASK [user : Create {{ group_name }} Group] ************************************ | |
[0;33mchanged: [default] => {"ansible_facts": {}, "changed": true, "gid": 1001, "name": "webapp_server", "state": "present", "system": false} | |
TASK [user : Add user "webapp_server"] ***************************************** | |
[0;33mchanged: [default] => {"ansible_facts": {}, "changed": true, "comment": "", "create_home": true, "group": 1001, "home": "/home/webapp_server", "name": "webapp_server", "shell": "/bin/sh", "state": "present", "system": false, "uid": 1001} | |
TASK [user : Allow specified users to sudo] ************************************ | |
[0;36mskipping: [default] => {"changed": false, "skip_reason": "Conditional result was False"} | |
TASK [webapp-server : Create a directory /opt/webapp-server/bin/ if it does not exist] *** | |
[0;33mchanged: [default] => {"ansible_facts": {}, "changed": true, "gid": 1001, "group": "webapp_server", "mode": "0755", "owner": "webapp_server", "path": "/opt/webapp-server/bin", "size": 4096, "state": "directory", "uid": 1001} | |
TASK [webapp-server : Create a directory /opt/webapp-server/conf/ if it does not exist] *** | |
[0;33mchanged: [default] => {"ansible_facts": {}, "changed": true, "gid": 1001, "group": "webapp_server", "mode": "0755", "owner": "webapp_server", "path": "/opt/webapp-server/conf", "size": 4096, "state": "directory", "uid": 1001} | |
TASK [webapp-server : Download WebApp] ***************************************** | |
[0;33mchanged: [default] => {"ansible_facts": {}, "changed": true, "checksum_dest": null, "checksum_src": "28f105a4ed1478f27001141888cb86efc7ace7aa", "dest": "/opt/webapp-server/bin/webapp-server", "elapsed": 2, "gid": 1001, "group": "webapp_server", "md5sum": "66e5a7366408e9db471e3e9586e01708", "mode": "0744", "msg": "OK (6213632 bytes)", "owner": "webapp_server", "size": 6213632, "src": "/root/.ansible/tmp/ansible-moduletmp-1615677423.32-7ZbofM/tmpevTdKs", "state": "file", "status_code": 200, "uid": 1001, "url": "https://playpit-labs-assets.s3-eu-west-1.amazonaws.com/webapp-server/webapp-server"} | |
TASK [webapp-server : Copy Configuration File] ********************************* | |
[0;33mchanged: [default] => {"changed": true, "checksum": "dbd39f628793de1d521f9fc0b8a820442c529208", "dest": "/opt/webapp-server/conf/webapp-server.conf", "gid": 1001, "group": "webapp_server", "md5sum": "97ffa8f2f8e2625267bf181e2da6e0f0", "mode": "0644", "owner": "webapp_server", "size": 162, "src": "/root/.ansible/tmp/ansible_mitogen_action_bc47d066146f9290/source", "state": "file", "uid": 1001} | |
TASK [webapp-server : Copy WebApp Service File] ******************************** | |
[0;33mchanged: [default] => {"changed": true, "checksum": "4120de07850aa0d7fd1151a92bbfb13ddd378639", "dest": "/usr/lib/systemd/system/webapp-server.service", "gid": 0, "group": "root", "md5sum": "31b491aea304dd63cdf572aa67eb6ecf", "mode": "0644", "owner": "root", "size": 304, "src": "/root/.ansible/tmp/ansible_mitogen_action_ac57730864e55e02/source", "state": "file", "uid": 0} | |
TASK [webapp-server : Enable and start WebApp service] ************************* | |
[0;33mchanged: [default] => {"ansible_facts": {}, "changed": true, "enabled": true, "name": "webapp-server", "state": "started", "status": {"ActiveEnterTimestampMonotonic": "0", "ActiveExitTimestampMonotonic": "0", "ActiveState": "inactive", "After": "systemd-journald.socket system.slice basic.target network.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 WebApp Server", "DevicePolicy": "auto", "EnvironmentFile": "/opt/webapp-server/conf/webapp-server.conf (ignore_errors=yes)", "ExecMainCode": "0", "ExecMainExitTimestampMonotonic": "0", "ExecMainPID": "0", "ExecMainStartTimestampMonotonic": "0", "ExecMainStatus": "0", "ExecStart": "{ path=/opt/webapp-server/bin/webapp-server ; argv[]=/opt/webapp-server/bin/webapp-server ; 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": "/usr/lib/systemd/system/webapp-server.service", "Group": "webapp_server", "GuessMainPID": "yes", "IOScheduling": "4", "Id": "webapp-server.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": "webapp-server.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": "webapp_server", "Wants": "system.slice", "WatchdogTimestampMonotonic": "0", "WatchdogUSec": "0"}} | |
TASK [webapp-server : Wait for start] ****************************************** | |
[0;32mok: [default] => {"ansible_facts": {}, "changed": false, "elapsed": 0, "match_groupdict": {}, "match_groups": [], "path": null, "port": 8081, "search_regex": null, "state": "started"} | |
RUNNING HANDLER [webapp-server : webapp-server restart] ************************ | |
[0;33mchanged: [default] => {"ansible_facts": {}, "changed": true, "name": "webapp-server", "state": "started", "status": {"ActiveEnterTimestamp": "Sat 2021-03-13 23:17:10 UTC", "ActiveEnterTimestampMonotonic": "355323409654", "ActiveExitTimestampMonotonic": "0", "ActiveState": "active", "After": "systemd-journald.socket system.slice network.target basic.target", "AllowIsolate": "no", "AmbientCapabilities": "0", "AssertResult": "yes", "AssertTimestamp": "Sat 2021-03-13 23:17:10 UTC", "AssertTimestampMonotonic": "355323408888", "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 23:17:10 UTC", "ConditionTimestampMonotonic": "355323408888", "Conflicts": "shutdown.target", "ControlGroup": "/docker/faf3bf84f8181cd82c1f339e909726fde14ad73beb2636da46ec4153ea3cd266/system.slice/webapp-server.service", "ControlPID": "0", "DefaultDependencies": "yes", "Delegate": "no", "Description": "Simple WebApp Server", "DevicePolicy": "auto", "EnvironmentFile": "/opt/webapp-server/conf/webapp-server.conf (ignore_errors=yes)", "ExecMainCode": "0", "ExecMainExitTimestampMonotonic": "0", "ExecMainPID": "2249", "ExecMainStartTimestamp": "Sat 2021-03-13 23:17:10 UTC", "ExecMainStartTimestampMonotonic": "355323409579", "ExecMainStatus": "0", "ExecStart": "{ path=/opt/webapp-server/bin/webapp-server ; argv[]=/opt/webapp-server/bin/webapp-server ; ignore_errors=no ; start_time=[Sat 2021-03-13 23:17:10 UTC] ; stop_time=[n/a] ; pid=2249 ; 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": "/usr/lib/systemd/system/webapp-server.service", "Group": "webapp_server", "GuessMainPID": "yes", "IOScheduling": "4", "Id": "webapp-server.service", "IgnoreOnIsolate": "no", "IgnoreOnSnapshot": "no", "IgnoreSIGPIPE": "yes", "InactiveEnterTimestampMonotonic": "0", "InactiveExitTimestamp": "Sat 2021-03-13 23:17:10 UTC", "InactiveExitTimestampMonotonic": "355323409654", "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": "2249", "MemoryAccounting": "no", "MemoryCurrent": "18446744073709551615", "MemoryLimit": "18446744073709551615", "MountFlags": "0", "Names": "webapp-server.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": "webapp_server", "WantedBy": "multi-user.target", "Wants": "system.slice", "WatchdogTimestamp": "Sat 2021-03-13 23:17:10 UTC", "WatchdogTimestampMonotonic": "355323409626", "WatchdogUSec": "0"}} | |
PLAY RECAP ********************************************************************* | |
[0;33mdefault : [0;32mok=14 [0;33mchanged=11 unreachable=0 failed=0 [0;36mskipped=1 rescued=0 ignored=0 | |
* About to connect() to localhost port 8081 (#0) | |
* Trying 127.0.0.1... | |
* Connected to localhost (127.0.0.1) port 8081 (#0) | |
> GET / HTTP/1.1 | |
> User-Agent: curl/7.29.0 | |
> Host: localhost:8081 | |
> Accept: */* | |
> | |
< HTTP/1.1 200 OK | |
< Expires: 0 | |
< Pragma: no-cache | |
< Date: Sat, 13 Mar 2021 23:17:12 GMT | |
< Content-Length: 195 | |
< Content-Type: text/plain; charset=utf-8 | |
< | |
{ [data not shown] | |
* Connection #0 to host localhost left intact | |
2021/03/13 23:18:05 ✓ [2.3 WebApp-Server Role (centos 7)] => stress-test: changing student name (1), 52.733s | |
2021/03/13 23:18:54 ✓ [2.3 WebApp-Server Role (centos 7)] => stress-test: changing application home dir (1), 48.497s | |
2021/03/13 23:19:35 ✓ [2.3 WebApp-Server Role (centos 7)] => rollout (Not ROOT) (5), 41.863s | |
2021/03/13 23:19:51 ✓ [2.3 WebApp-Server Role (centos 7)] => idempotancy check (Not ROOT) (5), 15.339s | |
2021/03/13 23:19:51 ----------------------------------------------------------------------------------- | |
2021/03/13 23:19:51 Tests Summary: | |
2021/03/13 23:19:51 15 (of 17) tests passed, 2 tests failed; rated as 93.94% | |
2021/03/13 23:19:51 | |
2021/03/13 23:19:51 Time Spent: 4m51.139s | |
2021/03/13 23:19:51 ----------------------------------------------------------------------------------- | |
name: sergey_kosolapov, master/4ad3fb3 @ 2021-03-13 11:43:41 +0000 | |
2021/03/13 23:19:51 config: tests/mysqldb.yml | |
2021/03/13 23:19:51 verbosity: 2 | |
2021/03/13 23:19:51 ----------------------------------------------------------------------------------- | |
2021/03/13 23:19:51 Running '2.3 MysqlDB Role (CentOS 7)', 1..17 tests | |
2021/03/13 23:19:51 ----------------------------------------------------------------------------------- | |
2021/03/13 23:19:56 ✗ [2.3 MysqlDB Role (CentOS 7)] -> 'mysql_db' role linter | |
2021/03/13 23:19:56 Result: exit status 2 | |
2021/03/13 23:19:56 Output: | |
Added ANSIBLE_ROLES_PATH=~/.ansible/roles:/usr/share/ansible/roles:/etc/ansible/roles:roles | |
WARNING Listing 2 violation(s) that are fatal | |
no-handler: Tasks that run when changed should likely be handlers | |
roles/mysql_db/tasks/main.yml:53 Task/Handler: running mysqld command for initiallizing | |
no-handler: Tasks that run when changed should likely be handlers | |
roles/mysql_db/tasks/main.yml:65 Task/Handler: seting password to defaults root | |
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 | |
- no-handler # Tasks that run when changed should likely be handlers | |
Finished with [1;34m2 failure(s), [1;34m0 warning(s) on [1;34m21 files. | |
2021/03/13 23:19:59 ✓ [2.3 MysqlDB Role (CentOS 7)] => 'mysql_db_user' role linter (1), 3.101s | |
2021/03/13 23:20:00 ✓ [2.3 MysqlDB Role (CentOS 7)] => playbook syntax check (1), 985ms | |
2021/03/13 23:22:44 ✓ [2.3 MysqlDB Role (CentOS 7)] => running role-mysqldb.yml playbook (1), 2m44.516s | |
2021/03/13 23:26:29 ✓ [2.3 MysqlDB Role (CentOS 7)] => apply 'mysql_db' role (1), 3m44.594s | |
2021/03/13 23:26:43 ✓ [2.3 MysqlDB Role (CentOS 7)] => apply 'mysql_db' role again (1), 13.346s | |
2021/03/13 23:26:46 ✓ [2.3 MysqlDB Role (CentOS 7)] => apply 'mysql_db_user' role (1), 3.671s | |
2021/03/13 23:26:50 ✓ [2.3 MysqlDB Role (CentOS 7)] => apply 'mysql_db_user' role again (1), 3.396s | |
2021/03/13 23:26:50 ✓ [2.3 MysqlDB Role (CentOS 7)] => db service is enabled (1), 166ms | |
2021/03/13 23:26:50 ✓ [2.3 MysqlDB Role (CentOS 7)] => db service is active (1), 148ms | |
2021/03/13 23:26:50 ✓ [2.3 MysqlDB Role (CentOS 7)] => db service is running on 3306 (1), 141ms | |
2021/03/13 23:26:51 ✓ [2.3 MysqlDB Role (CentOS 7)] => db root password set (1), 226ms | |
2021/03/13 23:26:51 ✓ [2.3 MysqlDB Role (CentOS 7)] => custom db user (non-root) created (1), 138ms | |
2021/03/13 23:30:12 ✓ [2.3 MysqlDB Role (CentOS 7)] => apply 'mysql_db' role (Not ROOT) (1), 3m21.729s | |
2021/03/13 23:30:26 ✓ [2.3 MysqlDB Role (CentOS 7)] => apply 'mysql_db' role (Not ROOT) again (1), 13.815s | |
2021/03/13 23:30:30 ✓ [2.3 MysqlDB Role (CentOS 7)] => apply 'mysql_db_user' role (Not ROOT) (1), 4.192s | |
2021/03/13 23:30:34 ✓ [2.3 MysqlDB Role (CentOS 7)] => apply 'mysql_db_user' role (Not ROOT) again (1), 3.712s | |
2021/03/13 23:30:35 ----------------------------------------------------------------------------------- | |
2021/03/13 23:30:35 Tests Summary: | |
2021/03/13 23:30:35 16 (of 17) tests passed, 1 tests failed; rated as 94.12% | |
2021/03/13 23:30:35 | |
2021/03/13 23:30:35 Time Spent: 10m44.043s | |
2021/03/13 23:30:35 ----------------------------------------------------------------------------------- | |
name: sergey_kosolapov, master/4ad3fb3 @ 2021-03-13 11:43:41 +0000 | |
2021/03/13 23:30:35 config: tests/mysqldb-check.yml | |
2021/03/13 23:30:35 verbosity: 2 | |
2021/03/13 23:30:35 ----------------------------------------------------------------------------------- | |
2021/03/13 23:30:35 Running '2.3 MySQL DB Check', 1..16 tests | |
2021/03/13 23:30:35 ----------------------------------------------------------------------------------- | |
2021/03/13 23:30:41 ✗ [2.3 MySQL DB Check] -> 'mysql_db_check' role linter | |
2021/03/13 23:30:41 Result: exit status 2 | |
2021/03/13 23:30:41 Output: | |
Added ANSIBLE_ROLES_PATH=~/.ansible/roles:/usr/share/ansible/roles:/etc/ansible/roles:roles | |
WARNING Listing 3 violation(s) that are fatal | |
meta-incorrect: Should change default metadata: author | |
:0 | |
meta-incorrect: Should change default metadata: company | |
:0 | |
meta-incorrect: Should change default metadata: license | |
:0 | |
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 | |
- meta-incorrect # meta/main.yml default values should be changed | |
Finished with [1;34m3 failure(s), [1;34m0 warning(s) on [1;34m7 files. | |
2021/03/13 23:30:42 ✓ [2.3 MySQL DB Check] => 'role-mysqldb-check.yml' playbook syntax check (1), 928ms | |
2021/03/13 23:31:30 ✓ [2.3 MySQL DB Check] => apply 'role-mysqldb-check.yml' playbook (1), 48.218s | |
2021/03/13 23:32:28 ✓ [2.3 MySQL DB Check] => apply 'mysql_db_check' role (default settings) (1), 58.709s | |
2021/03/13 23:32:29 ✗ [2.3 MySQL DB Check] -> service responds 200 (after initial rollout) | |
2021/03/13 23:32:29 Result: exit status 7 | |
2021/03/13 23:32: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/13 23:32:45 ✓ [2.3 MySQL DB Check] => idempotency check (apply the role twice) (1), 15.895s | |
2021/03/13 23:32:45 ✗ [2.3 MySQL DB Check] -> service responds 200 (after idempotancy check) | |
2021/03/13 23:32:45 Result: exit status 7 | |
2021/03/13 23:32:45 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 23:32:45 ✓ [2.3 MySQL DB Check] => service is enabled (1), 226ms | |
2021/03/13 23:32:45 ✓ [2.3 MySQL DB Check] => service runs under proper user/group (1), 347ms | |
2021/03/13 23:32:46 ✓ [2.3 MySQL DB Check] => application user has no password set (1), 188ms | |
2021/03/13 23:33:26 ✓ [2.3 MySQL DB Check] => trying another application port (1), 40.037s | |
2021/03/13 23:34:11 ✗ [2.3 MySQL DB Check] -> trying another application home dir | |
2021/03/13 23:34:11 Result: exit status 7 | |
2021/03/13 23:34:11 Output: | |
db-check | |
d315cd5d4ffdbc328ec8a349d17bc59f14c5e26b4fcb4bc1e18acfbd9b1ef870 | |
[0;34mNo config file found; using defaults | |
PLAY [db-check] **************************************************************** | |
TASK [base : install epel] ***************************************************** | |
[0;32mok: [db-check] => {"ansible_facts": {"discovered_interpreter_python": "/usr/bin/python"}, "changed": false, "msg": "", "rc": 0, "results": ["epel-release-7-11.noarch providing epel-release is already installed"]} | |
TASK [base : install soft] ***************************************************** | |
[0;33mchanged: [db-check] => {"ansible_facts": {}, "changed": true, "changes": {"installed": ["python-devel", "wget"]}, "msg": "", "rc": 0, "results": ["python2-pip-8.1.2-8.el7.noarch providing python-pip is already installed", "curl-7.29.0-51.el7.x86_64 providing curl is already installed", "iproute-4.11.0-14.el7.x86_64 providing iproute is already installed", "sudo-1.8.23-3.el7.x86_64 providing sudo is already installed", "Loaded plugins: fastestmirror, ovl\nDetermining fastest mirrors\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 python-devel.x86_64 0:2.7.5-90.el7 will be installed\n--> Processing Dependency: python(x86-64) = 2.7.5-90.el7 for package: python-devel-2.7.5-90.el7.x86_64\n--> Processing Dependency: python2-rpm-macros > 3-30 for package: python-devel-2.7.5-90.el7.x86_64\n--> Processing Dependency: python-rpm-macros > 3-30 for package: python-devel-2.7.5-90.el7.x86_64\n---> Package wget.x86_64 0:1.14-18.el7_6.1 will be installed\n--> Running transaction check\n---> Package python.x86_64 0:2.7.5-77.el7_6 will be updated\n---> Package python.x86_64 0:2.7.5-90.el7 will be an update\n--> Processing Dependency: python-libs(x86-64) = 2.7.5-90.el7 for package: python-2.7.5-90.el7.x86_64\n---> Package python-rpm-macros.noarch 0:3-34.el7 will be installed\n--> Processing Dependency: python-srpm-macros for package: python-rpm-macros-3-34.el7.noarch\n---> Package python2-rpm-macros.noarch 0:3-34.el7 will be installed\n--> Running transaction check\n---> Package python-libs.x86_64 0:2.7.5-77.el7_6 will be updated\n---> Package python-libs.x86_64 0:2.7.5-90.el7 will be an update\n---> Package python-srpm-macros.noarch 0:3-34.el7 will be installed\n--> Finished Dependency Resolution\n\nDependencies Resolved\n\n================================================================================\n Package Arch Version Repository Size\n================================================================================\nInstalling:\n python-devel x86_64 2.7.5-90.el7 updates 399 k\n wget x86_64 1.14-18.el7_6.1 base 547 k\nInstalling for dependencies:\n python-rpm-macros noarch 3-34.el7 base 9.1 k\n python-srpm-macros noarch 3-34.el7 base 8.8 k\n python2-rpm-macros noarch 3-34.el7 base 8.1 k\nUpdating for dependencies:\n python x86_64 2.7.5-90.el7 updates 96 k\n python-libs x86_64 2.7.5-90.el7 updates 5.6 M\n\nTransaction Summary\n================================================================================\nInstall 2 Packages (+3 Dependent packages)\nUpgrade ( 2 Dependent packages)\n\nTotal download size: 6.7 M\nDownloading packages:\nNo Presto metadata available for updates\n--------------------------------------------------------------------------------\nTotal 14 MB/s | 6.7 MB 00:00 \nRunning transaction check\nRunning transaction test\nTransaction test succeeded\nRunning transaction\n Updating : python-libs-2.7.5-90.el7.x86_64 1/9 \n Updating : python-2.7.5-90.el7.x86_64 2/9 \n Installing : python-srpm-macros-3-34.el7.noarch 3/9 \n Installing : python-rpm-macros-3-34.el7.noarch 4/9 \n Installing : python2-rpm-macros-3-34.el7.noarch 5/9 \n Installing : python-devel-2.7.5-90.el7.x86_64 6/9 \n Installing : wget-1.14-18.el7_6.1.x86_64 7/9 \ninstall-info: No such file or directory for /usr/share/info/wget.info.gz\n Cleanup : python-2.7.5-77.el7_6.x86_64 8/9 \n Cleanup : python-libs-2.7.5-77.el7_6.x86_64 9/9 \n Verifying : python2-rpm-macros-3-34.el7.noarch 1/9 \n Verifying : python-libs-2.7.5-90.el7.x86_64 2/9 \n Verifying : python-devel-2.7.5-90.el7.x86_64 3/9 \n Verifying : python-2.7.5-90.el7.x86_64 4/9 \n Verifying : python-rpm-macros-3-34.el7.noarch 5/9 \n Verifying : wget-1.14-18.el7_6.1.x86_64 6/9 \n Verifying : python-srpm-macros-3-34.el7.noarch 7/9 \n Verifying : python-2.7.5-77.el7_6.x86_64 8/9 \n Verifying : python-libs-2.7.5-77.el7_6.x86_64 9/9 \n\nInstalled:\n python-devel.x86_64 0:2.7.5-90.el7 wget.x86_64 0:1.14-18.el7_6.1 \n\nDependency Installed:\n python-rpm-macros.noarch 0:3-34.el7 python-srpm-macros.noarch 0:3-34.el7 \n python2-rpm-macros.noarch 0:3-34.el7 \n\nDependency Updated:\n python.x86_64 0:2.7.5-90.el7 python-libs.x86_64 0:2.7.5-90.el7 \n\nComplete!\n"]} | |
TASK [base : Ensure directory for ansible facts exists] ************************ | |
[0;33mchanged: [db-check] => {"ansible_facts": {}, "changed": true, "gid": 0, "group": "root", "mode": "0755", "owner": "root", "path": "/etc/ansible/facts.d/", "size": 4096, "state": "directory", "uid": 0} | |
TASK [user : Create {{ group_name }} Group] ************************************ | |
[0;33mchanged: [db-check] => {"ansible_facts": {}, "changed": true, "gid": 1001, "name": "mysqldb-check", "state": "present", "system": false} | |
TASK [user : Add user "mysqldb-check"] ***************************************** | |
[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 [user : Allow specified users to sudo] ************************************ | |
[0;36mskipping: [db-check] => {"changed": false, "skip_reason": "Conditional result was False"} | |
TASK [mysql_db_check : Create {{ group_name }} Group] ************************** | |
[0;32mok: [db-check] => {"ansible_facts": {}, "changed": false, "gid": 1001, "name": "mysqldb-check", "state": "present", "system": false} | |
TASK [mysql_db_check : Add user "user"] **************************************** | |
[0;32mok: [db-check] => {"ansible_facts": {}, "append": false, "changed": false, "comment": "", "group": 1001, "home": "/home/mysqldb-check", "move_home": false, "name": "mysqldb-check", "shell": "/bin/sh", "state": "present", "uid": 1001} | |
TASK [mysql_db_check : Create a directory /opt/mysqldb-check/bin/ if it does not exist] *** | |
[0;33mchanged: [db-check] => {"ansible_facts": {}, "changed": true, "gid": 1001, "group": "mysqldb-check", "mode": "0755", "owner": "mysqldb-check", "path": "/opt/mysqldb-check-test/bin", "size": 4096, "state": "directory", "uid": 1001} | |
TASK [mysql_db_check : Create a directory /opt/mysqldb-check/config/ if it does not exist] *** | |
[0;33mchanged: [db-check] => {"ansible_facts": {}, "changed": true, "gid": 1001, "group": "mysqldb-check", "mode": "0755", "owner": "mysqldb-check", "path": "/opt/mysqldb-check-test/config", "size": 4096, "state": "directory", "uid": 1001} | |
TASK [mysql_db_check : Download Mysqldbcheck] ********************************** | |
[0;33mchanged: [db-check] => {"ansible_facts": {}, "changed": true, "checksum_dest": null, "checksum_src": "aa78532d520cf2f82ccc587af851596c0d17d08c", "dest": "/opt/mysqldb-check-test/bin/mysql-check", "elapsed": 0, "gid": 1001, "group": "mysqldb-check", "md5sum": "0b5a84cf51fcf79480b4f36b4c88153b", "mode": "0744", "msg": "OK (1818876 bytes)", "owner": "mysqldb-check", "size": 1818876, "src": "/root/.ansible/tmp/ansible-moduletmp-1615678443.58-AoM6y0/tmp6KQX9B", "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 Mysqldbcheck Configuration File] ******************* | |
[0;33mchanged: [db-check] => {"changed": true, "checksum": "1884b73b4cb8e1850fc34f9cbf81793c0a5a44ec", "dest": "/opt/mysqldb-check-test/config/mysqldb-check.conf", "gid": 1001, "group": "mysqldb-check", "md5sum": "da77ec806a98e6979e94a77fbb43fa58", "mode": "0644", "owner": "mysqldb-check", "size": 10, "src": "/root/.ansible/tmp/ansible_mitogen_action_330989f87d204fc1/source", "state": "file", "uid": 1001} | |
TASK [mysql_db_check : Copy Mysqldbcheck Service File] ************************* | |
[0;33mchanged: [db-check] => {"changed": true, "checksum": "ee6644705790942ae5e245301359582844db89ab", "dest": "/usr/lib/systemd/system/mysqldb-check.service", "gid": 0, "group": "root", "md5sum": "ef009378555018888106128138b61ad6", "mode": "0644", "owner": "root", "size": 314, "src": "/root/.ansible/tmp/ansible_mitogen_action_0b0e98f50626c1ba/source", "state": "file", "uid": 0} | |
TASK [mysql_db_check : Enable and start Mysqldbcheck service] ****************** | |
[0;33mchanged: [db-check] => {"ansible_facts": {}, "changed": true, "enabled": true, "name": "mysqldb-check", "state": "started", "status": {"ActiveEnterTimestampMonotonic": "0", "ActiveExitTimestampMonotonic": "0", "ActiveState": "inactive", "After": "systemd-journald.socket basic.target network.target system.slice", "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 WebApp Server", "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": "/usr/lib/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"}} | |
TASK [mysql_db_check : Wait for start] ***************************************** | |
[0;32mok: [db-check] => {"ansible_facts": {}, "changed": false, "elapsed": 0, "match_groupdict": {}, "match_groups": [], "path": null, "port": 8081, "search_regex": null, "state": "started"} | |
RUNNING HANDLER [mysql_db_check : mysqldb-check restart] *********************** | |
[0;33mchanged: [db-check] => {"ansible_facts": {}, "changed": true, "name": "mysqldb-check", "state": "started", "status": {"ActiveEnterTimestamp": "Sat 2021-03-13 23:34:09 UTC", "ActiveEnterTimestampMonotonic": "356342198607", "ActiveExitTimestampMonotonic": "0", "ActiveState": "active", "After": "system.slice network.target basic.target systemd-journald.socket", "AllowIsolate": "no", "AmbientCapabilities": "0", "AssertResult": "yes", "AssertTimestamp": "Sat 2021-03-13 23:34:09 UTC", "AssertTimestampMonotonic": "356342197406", "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": "yes", "ConditionTimestamp": "Sat 2021-03-13 23:34:09 UTC", "ConditionTimestampMonotonic": "356342197406", "Conflicts": "shutdown.target", "ControlGroup": "/docker/d315cd5d4ffdbc328ec8a349d17bc59f14c5e26b4fcb4bc1e18acfbd9b1ef870/system.slice/mysqldb-check.service", "ControlPID": "0", "DefaultDependencies": "yes", "Delegate": "no", "Description": "Simple WebApp Server", "DevicePolicy": "auto", "EnvironmentFile": "/opt/mysqldb-check-test/config/mysqldb-check.conf (ignore_errors=yes)", "ExecMainCode": "0", "ExecMainExitTimestampMonotonic": "0", "ExecMainPID": "2262", "ExecMainStartTimestamp": "Sat 2021-03-13 23:34:09 UTC", "ExecMainStartTimestampMonotonic": "356342198521", "ExecMainStatus": "0", "ExecStart": "{ path=/opt/mysqldb-check-test/bin/mysql-check ; argv[]=/opt/mysqldb-check-test/bin/mysql-check ; ignore_errors=no ; start_time=[Sat 2021-03-13 23:34:09 UTC] ; stop_time=[n/a] ; pid=2262 ; 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": "/usr/lib/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": "Sat 2021-03-13 23:34:09 UTC", "InactiveExitTimestampMonotonic": "356342198607", "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": "2262", "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": "Sat 2021-03-13 23:34:09 UTC", "WatchdogTimestampMonotonic": "356342198564", "WatchdogUSec": "0"}} | |
PLAY RECAP ********************************************************************* | |
[0;33mdb-check : [0;32mok=15 [0;33mchanged=11 unreachable=0 failed=0 [0;36mskipped=1 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/13 23:35:01 ✗ [2.3 MySQL DB Check] -> trying another application user | |
2021/03/13 23:35:01 Result: exit status 7 | |
2021/03/13 23:35:01 Output: | |
db-check | |
ffc08e463cebd10e3d61434b697c3406ddf239a85e42726d670c7c605ada0109 | |
[0;34mNo config file found; using defaults | |
PLAY [db-check] **************************************************************** | |
TASK [base : install epel] ***************************************************** | |
[0;32mok: [db-check] => {"ansible_facts": {"discovered_interpreter_python": "/usr/bin/python"}, "changed": false, "msg": "", "rc": 0, "results": ["epel-release-7-11.noarch providing epel-release is already installed"]} | |
TASK [base : install soft] ***************************************************** | |
[0;33mchanged: [db-check] => {"ansible_facts": {}, "changed": true, "changes": {"installed": ["python-devel", "wget"]}, "msg": "", "rc": 0, "results": ["python2-pip-8.1.2-8.el7.noarch providing python-pip is already installed", "curl-7.29.0-51.el7.x86_64 providing curl is already installed", "iproute-4.11.0-14.el7.x86_64 providing iproute is already installed", "sudo-1.8.23-3.el7.x86_64 providing sudo is already installed", "Loaded plugins: fastestmirror, ovl\nDetermining fastest mirrors\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 python-devel.x86_64 0:2.7.5-90.el7 will be installed\n--> Processing Dependency: python(x86-64) = 2.7.5-90.el7 for package: python-devel-2.7.5-90.el7.x86_64\n--> Processing Dependency: python2-rpm-macros > 3-30 for package: python-devel-2.7.5-90.el7.x86_64\n--> Processing Dependency: python-rpm-macros > 3-30 for package: python-devel-2.7.5-90.el7.x86_64\n---> Package wget.x86_64 0:1.14-18.el7_6.1 will be installed\n--> Running transaction check\n---> Package python.x86_64 0:2.7.5-77.el7_6 will be updated\n---> Package python.x86_64 0:2.7.5-90.el7 will be an update\n--> Processing Dependency: python-libs(x86-64) = 2.7.5-90.el7 for package: python-2.7.5-90.el7.x86_64\n---> Package python-rpm-macros.noarch 0:3-34.el7 will be installed\n--> Processing Dependency: python-srpm-macros for package: python-rpm-macros-3-34.el7.noarch\n---> Package python2-rpm-macros.noarch 0:3-34.el7 will be installed\n--> Running transaction check\n---> Package python-libs.x86_64 0:2.7.5-77.el7_6 will be updated\n---> Package python-libs.x86_64 0:2.7.5-90.el7 will be an update\n---> Package python-srpm-macros.noarch 0:3-34.el7 will be installed\n--> Finished Dependency Resolution\n\nDependencies Resolved\n\n================================================================================\n Package Arch Version Repository Size\n================================================================================\nInstalling:\n python-devel x86_64 2.7.5-90.el7 updates 399 k\n wget x86_64 1.14-18.el7_6.1 base 547 k\nInstalling for dependencies:\n python-rpm-macros noarch 3-34.el7 base 9.1 k\n python-srpm-macros noarch 3-34.el7 base 8.8 k\n python2-rpm-macros noarch 3-34.el7 base 8.1 k\nUpdating for dependencies:\n python x86_64 2.7.5-90.el7 updates 96 k\n python-libs x86_64 2.7.5-90.el7 updates 5.6 M\n\nTransaction Summary\n================================================================================\nInstall 2 Packages (+3 Dependent packages)\nUpgrade ( 2 Dependent packages)\n\nTotal download size: 6.7 M\nDownloading packages:\nNo Presto metadata available for updates\n--------------------------------------------------------------------------------\nTotal 14 MB/s | 6.7 MB 00:00 \nRunning transaction check\nRunning transaction test\nTransaction test succeeded\nRunning transaction\n Updating : python-libs-2.7.5-90.el7.x86_64 1/9 \n Updating : python-2.7.5-90.el7.x86_64 2/9 \n Installing : python-srpm-macros-3-34.el7.noarch 3/9 \n Installing : python-rpm-macros-3-34.el7.noarch 4/9 \n Installing : python2-rpm-macros-3-34.el7.noarch 5/9 \n Installing : python-devel-2.7.5-90.el7.x86_64 6/9 \n Installing : wget-1.14-18.el7_6.1.x86_64 7/9 \ninstall-info: No such file or directory for /usr/share/info/wget.info.gz\n Cleanup : python-2.7.5-77.el7_6.x86_64 8/9 \n Cleanup : python-libs-2.7.5-77.el7_6.x86_64 9/9 \n Verifying : python2-rpm-macros-3-34.el7.noarch 1/9 \n Verifying : python-libs-2.7.5-90.el7.x86_64 2/9 \n Verifying : python-devel-2.7.5-90.el7.x86_64 3/9 \n Verifying : python-2.7.5-90.el7.x86_64 4/9 \n Verifying : python-rpm-macros-3-34.el7.noarch 5/9 \n Verifying : wget-1.14-18.el7_6.1.x86_64 6/9 \n Verifying : python-srpm-macros-3-34.el7.noarch 7/9 \n Verifying : python-2.7.5-77.el7_6.x86_64 8/9 \n Verifying : python-libs-2.7.5-77.el7_6.x86_64 9/9 \n\nInstalled:\n python-devel.x86_64 0:2.7.5-90.el7 wget.x86_64 0:1.14-18.el7_6.1 \n\nDependency Installed:\n python-rpm-macros.noarch 0:3-34.el7 python-srpm-macros.noarch 0:3-34.el7 \n python2-rpm-macros.noarch 0:3-34.el7 \n\nDependency Updated:\n python.x86_64 0:2.7.5-90.el7 python-libs.x86_64 0:2.7.5-90.el7 \n\nComplete!\n"]} | |
TASK [base : Ensure directory for ansible facts exists] ************************ | |
[0;33mchanged: [db-check] => {"ansible_facts": {}, "changed": true, "gid": 0, "group": "root", "mode": "0755", "owner": "root", "path": "/etc/ansible/facts.d/", "size": 4096, "state": "directory", "uid": 0} | |
TASK [user : Create {{ group_name }} Group] ************************************ | |
[0;33mchanged: [db-check] => {"ansible_facts": {}, "changed": true, "gid": 1001, "name": "mysqldb-check-test", "state": "present", "system": false} | |
TASK [user : Add user "mysqldb-check-test"] ************************************ | |
[0;33mchanged: [db-check] => {"ansible_facts": {}, "changed": true, "comment": "", "create_home": true, "group": 1001, "home": "/home/mysqldb-check-test", "name": "mysqldb-check-test", "shell": "/bin/sh", "state": "present", "system": false, "uid": 1001} | |
TASK [user : Allow specified users to sudo] ************************************ | |
[0;36mskipping: [db-check] => {"changed": false, "skip_reason": "Conditional result was False"} | |
TASK [mysql_db_check : Create {{ group_name }} Group] ************************** | |
[0;32mok: [db-check] => {"ansible_facts": {}, "changed": false, "gid": 1001, "name": "mysqldb-check-test", "state": "present", "system": false} | |
TASK [mysql_db_check : Add user "user"] **************************************** | |
[0;32mok: [db-check] => {"ansible_facts": {}, "append": false, "changed": false, "comment": "", "group": 1001, "home": "/home/mysqldb-check-test", "move_home": false, "name": "mysqldb-check-test", "shell": "/bin/sh", "state": "present", "uid": 1001} | |
TASK [mysql_db_check : Create a directory /opt/mysqldb-check/bin/ if it does not exist] *** | |
[0;33mchanged: [db-check] => {"ansible_facts": {}, "changed": true, "gid": 1001, "group": "mysqldb-check-test", "mode": "0755", "owner": "mysqldb-check-test", "path": "/opt/mysqldb-check/bin", "size": 4096, "state": "directory", "uid": 1001} | |
TASK [mysql_db_check : Create a directory /opt/mysqldb-check/config/ if it does not exist] *** | |
[0;33mchanged: [db-check] => {"ansible_facts": {}, "changed": true, "gid": 1001, "group": "mysqldb-check-test", "mode": "0755", "owner": "mysqldb-check-test", "path": "/opt/mysqldb-check/config", "size": 4096, "state": "directory", "uid": 1001} | |
TASK [mysql_db_check : Download Mysqldbcheck] ********************************** | |
[0;33mchanged: [db-check] => {"ansible_facts": {}, "changed": true, "checksum_dest": null, "checksum_src": "aa78532d520cf2f82ccc587af851596c0d17d08c", "dest": "/opt/mysqldb-check/bin/mysql-check", "elapsed": 0, "gid": 1001, "group": "mysqldb-check-test", "md5sum": "0b5a84cf51fcf79480b4f36b4c88153b", "mode": "0744", "msg": "OK (1818876 bytes)", "owner": "mysqldb-check-test", "size": 1818876, "src": "/root/.ansible/tmp/ansible-moduletmp-1615678495.6-RdrmAt/tmpba7ElK", "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 Mysqldbcheck Configuration File] ******************* | |
[0;33mchanged: [db-check] => {"changed": true, "checksum": "1884b73b4cb8e1850fc34f9cbf81793c0a5a44ec", "dest": "/opt/mysqldb-check/config/mysqldb-check.conf", "gid": 1001, "group": "mysqldb-check-test", "md5sum": "da77ec806a98e6979e94a77fbb43fa58", "mode": "0644", "owner": "mysqldb-check-test", "size": 10, "src": "/root/.ansible/tmp/ansible_mitogen_action_698cddb4180a2fe4/source", "state": "file", "uid": 1001} | |
TASK [mysql_db_check : Copy Mysqldbcheck Service File] ************************* | |
[0;33mchanged: [db-check] => {"changed": true, "checksum": "1332f7f9ebb5d74a8f674e624e6c4bc825234ccc", "dest": "/usr/lib/systemd/system/mysqldb-check.service", "gid": 0, "group": "root", "md5sum": "b9b4112d002e9cf80f303f1b4bbc39e1", "mode": "0644", "owner": "root", "size": 314, "src": "/root/.ansible/tmp/ansible_mitogen_action_c0538bbaf0add9ad/source", "state": "file", "uid": 0} | |
TASK [mysql_db_check : Enable and start Mysqldbcheck service] ****************** | |
[0;33mchanged: [db-check] => {"ansible_facts": {}, "changed": true, "enabled": true, "name": "mysqldb-check", "state": "started", "status": {"ActiveEnterTimestampMonotonic": "0", "ActiveExitTimestampMonotonic": "0", "ActiveState": "inactive", "After": "systemd-journald.socket basic.target system.slice network.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 WebApp Server", "DevicePolicy": "auto", "EnvironmentFile": "/opt/mysqldb-check/config/mysqldb-check.conf (ignore_errors=yes)", "ExecMainCode": "0", "ExecMainExitTimestampMonotonic": "0", "ExecMainPID": "0", "ExecMainStartTimestampMonotonic": "0", "ExecMainStatus": "0", "ExecStart": "{ path=/opt/mysqldb-check/bin/mysql-check ; argv[]=/opt/mysqldb-check/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": "/usr/lib/systemd/system/mysqldb-check.service", "Group": "mysqldb-check-test", "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-test", "Wants": "system.slice", "WatchdogTimestampMonotonic": "0", "WatchdogUSec": "0"}} | |
TASK [mysql_db_check : Wait for start] ***************************************** | |
[0;32mok: [db-check] => {"ansible_facts": {}, "changed": false, "elapsed": 0, "match_groupdict": {}, "match_groups": [], "path": null, "port": 8081, "search_regex": null, "state": "started"} | |
RUNNING HANDLER [mysql_db_check : mysqldb-check restart] *********************** | |
[0;33mchanged: [db-check] => {"ansible_facts": {}, "changed": true, "name": "mysqldb-check", "state": "started", "status": {"ActiveEnterTimestamp": "Sat 2021-03-13 23:34:59 UTC", "ActiveEnterTimestampMonotonic": "356393007249", "ActiveExitTimestampMonotonic": "0", "ActiveState": "active", "After": "systemd-journald.socket basic.target system.slice network.target", "AllowIsolate": "no", "AmbientCapabilities": "0", "AssertResult": "yes", "AssertTimestamp": "Sat 2021-03-13 23:34:59 UTC", "AssertTimestampMonotonic": "356393006025", "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": "yes", "ConditionTimestamp": "Sat 2021-03-13 23:34:59 UTC", "ConditionTimestampMonotonic": "356393006018", "Conflicts": "shutdown.target", "ControlGroup": "/docker/ffc08e463cebd10e3d61434b697c3406ddf239a85e42726d670c7c605ada0109/system.slice/mysqldb-check.service", "ControlPID": "0", "DefaultDependencies": "yes", "Delegate": "no", "Description": "Simple WebApp Server", "DevicePolicy": "auto", "EnvironmentFile": "/opt/mysqldb-check/config/mysqldb-check.conf (ignore_errors=yes)", "ExecMainCode": "0", "ExecMainExitTimestampMonotonic": "0", "ExecMainPID": "3879", "ExecMainStartTimestamp": "Sat 2021-03-13 23:34:59 UTC", "ExecMainStartTimestampMonotonic": "356393007129", "ExecMainStatus": "0", "ExecStart": "{ path=/opt/mysqldb-check/bin/mysql-check ; argv[]=/opt/mysqldb-check/bin/mysql-check ; ignore_errors=no ; start_time=[Sat 2021-03-13 23:34:59 UTC] ; stop_time=[n/a] ; pid=3879 ; 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": "/usr/lib/systemd/system/mysqldb-check.service", "Group": "mysqldb-check-test", "GuessMainPID": "yes", "IOScheduling": "4", "Id": "mysqldb-check.service", "IgnoreOnIsolate": "no", "IgnoreOnSnapshot": "no", "IgnoreSIGPIPE": "yes", "InactiveEnterTimestampMonotonic": "0", "InactiveExitTimestamp": "Sat 2021-03-13 23:34:59 UTC", "InactiveExitTimestampMonotonic": "356393007249", "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": "3879", "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-test", "WantedBy": "multi-user.target", "Wants": "system.slice", "WatchdogTimestamp": "Sat 2021-03-13 23:34:59 UTC", "WatchdogTimestampMonotonic": "356393007207", "WatchdogUSec": "0"}} | |
PLAY RECAP ********************************************************************* | |
[0;33mdb-check : [0;32mok=15 [0;33mchanged=11 unreachable=0 failed=0 [0;36mskipped=1 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/13 23:35:45 ✗ [2.3 MySQL DB Check] -> trying another application group | |
2021/03/13 23:35:45 Result: exit status 7 | |
2021/03/13 23:35:45 Output: | |
db-check | |
73bdd587237d53b9303d3707a21fa81e134df137092999ed6595bfc2c7d1b4ab | |
[0;34mNo config file found; using defaults | |
PLAY [db-check] **************************************************************** | |
TASK [base : install epel] ***************************************************** | |
[0;32mok: [db-check] => {"ansible_facts": {"discovered_interpreter_python": "/usr/bin/python"}, "changed": false, "msg": "", "rc": 0, "results": ["epel-release-7-11.noarch providing epel-release is already installed"]} | |
TASK [base : install soft] ***************************************************** | |
[0;33mchanged: [db-check] => {"ansible_facts": {}, "changed": true, "changes": {"installed": ["python-devel", "wget"]}, "msg": "", "rc": 0, "results": ["python2-pip-8.1.2-8.el7.noarch providing python-pip is already installed", "curl-7.29.0-51.el7.x86_64 providing curl is already installed", "iproute-4.11.0-14.el7.x86_64 providing iproute is already installed", "sudo-1.8.23-3.el7.x86_64 providing sudo is already installed", "Loaded plugins: fastestmirror, ovl\nDetermining fastest mirrors\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 python-devel.x86_64 0:2.7.5-90.el7 will be installed\n--> Processing Dependency: python(x86-64) = 2.7.5-90.el7 for package: python-devel-2.7.5-90.el7.x86_64\n--> Processing Dependency: python2-rpm-macros > 3-30 for package: python-devel-2.7.5-90.el7.x86_64\n--> Processing Dependency: python-rpm-macros > 3-30 for package: python-devel-2.7.5-90.el7.x86_64\n---> Package wget.x86_64 0:1.14-18.el7_6.1 will be installed\n--> Running transaction check\n---> Package python.x86_64 0:2.7.5-77.el7_6 will be updated\n---> Package python.x86_64 0:2.7.5-90.el7 will be an update\n--> Processing Dependency: python-libs(x86-64) = 2.7.5-90.el7 for package: python-2.7.5-90.el7.x86_64\n---> Package python-rpm-macros.noarch 0:3-34.el7 will be installed\n--> Processing Dependency: python-srpm-macros for package: python-rpm-macros-3-34.el7.noarch\n---> Package python2-rpm-macros.noarch 0:3-34.el7 will be installed\n--> Running transaction check\n---> Package python-libs.x86_64 0:2.7.5-77.el7_6 will be updated\n---> Package python-libs.x86_64 0:2.7.5-90.el7 will be an update\n---> Package python-srpm-macros.noarch 0:3-34.el7 will be installed\n--> Finished Dependency Resolution\n\nDependencies Resolved\n\n================================================================================\n Package Arch Version Repository Size\n================================================================================\nInstalling:\n python-devel x86_64 2.7.5-90.el7 updates 399 k\n wget x86_64 1.14-18.el7_6.1 base 547 k\nInstalling for dependencies:\n python-rpm-macros noarch 3-34.el7 base 9.1 k\n python-srpm-macros noarch 3-34.el7 base 8.8 k\n python2-rpm-macros noarch 3-34.el7 base 8.1 k\nUpdating for dependencies:\n python x86_64 2.7.5-90.el7 updates 96 k\n python-libs x86_64 2.7.5-90.el7 updates 5.6 M\n\nTransaction Summary\n================================================================================\nInstall 2 Packages (+3 Dependent packages)\nUpgrade ( 2 Dependent packages)\n\nTotal download size: 6.7 M\nDownloading packages:\nNo Presto metadata available for updates\n--------------------------------------------------------------------------------\nTotal 18 MB/s | 6.7 MB 00:00 \nRunning transaction check\nRunning transaction test\nTransaction test succeeded\nRunning transaction\n Updating : python-libs-2.7.5-90.el7.x86_64 1/9 \n Updating : python-2.7.5-90.el7.x86_64 2/9 \n Installing : python-srpm-macros-3-34.el7.noarch 3/9 \n Installing : python-rpm-macros-3-34.el7.noarch 4/9 \n Installing : python2-rpm-macros-3-34.el7.noarch 5/9 \n Installing : python-devel-2.7.5-90.el7.x86_64 6/9 \n Installing : wget-1.14-18.el7_6.1.x86_64 7/9 \ninstall-info: No such file or directory for /usr/share/info/wget.info.gz\n Cleanup : python-2.7.5-77.el7_6.x86_64 8/9 \n Cleanup : python-libs-2.7.5-77.el7_6.x86_64 9/9 \n Verifying : python2-rpm-macros-3-34.el7.noarch 1/9 \n Verifying : python-libs-2.7.5-90.el7.x86_64 2/9 \n Verifying : python-devel-2.7.5-90.el7.x86_64 3/9 \n Verifying : python-2.7.5-90.el7.x86_64 4/9 \n Verifying : python-rpm-macros-3-34.el7.noarch 5/9 \n Verifying : wget-1.14-18.el7_6.1.x86_64 6/9 \n Verifying : python-srpm-macros-3-34.el7.noarch 7/9 \n Verifying : python-2.7.5-77.el7_6.x86_64 8/9 \n Verifying : python-libs-2.7.5-77.el7_6.x86_64 9/9 \n\nInstalled:\n python-devel.x86_64 0:2.7.5-90.el7 wget.x86_64 0:1.14-18.el7_6.1 \n\nDependency Installed:\n python-rpm-macros.noarch 0:3-34.el7 python-srpm-macros.noarch 0:3-34.el7 \n python2-rpm-macros.noarch 0:3-34.el7 \n\nDependency Updated:\n python.x86_64 0:2.7.5-90.el7 python-libs.x86_64 0:2.7.5-90.el7 \n\nComplete!\n"]} | |
TASK [base : Ensure directory for ansible facts exists] ************************ | |
[0;33mchanged: [db-check] => {"ansible_facts": {}, "changed": true, "gid": 0, "group": "root", "mode": "0755", "owner": "root", "path": "/etc/ansible/facts.d/", "size": 4096, "state": "directory", "uid": 0} | |
TASK [user : Create {{ group_name }} Group] ************************************ | |
[0;33mchanged: [db-check] => {"ansible_facts": {}, "changed": true, "gid": 1001, "name": "mysqldb-check-test", "state": "present", "system": false} | |
TASK [user : Add user "mysqldb-check"] ***************************************** | |
[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 [user : Allow specified users to sudo] ************************************ | |
[0;36mskipping: [db-check] => {"changed": false, "skip_reason": "Conditional result was False"} | |
TASK [mysql_db_check : Create {{ group_name }} Group] ************************** | |
[0;33mchanged: [db-check] => {"ansible_facts": {}, "changed": true, "gid": 1002, "name": "mysqldb-check", "state": "present", "system": false} | |
TASK [mysql_db_check : Add user "user"] **************************************** | |
[0;32mok: [db-check] => {"ansible_facts": {}, "append": false, "changed": false, "comment": "", "group": 1001, "home": "/home/mysqldb-check", "move_home": false, "name": "mysqldb-check", "shell": "/bin/sh", "state": "present", "uid": 1001} | |
TASK [mysql_db_check : Create a directory /opt/mysqldb-check/bin/ if it does not exist] *** | |
[0;33mchanged: [db-check] => {"ansible_facts": {}, "changed": true, "gid": 1001, "group": "mysqldb-check-test", "mode": "0755", "owner": "mysqldb-check", "path": "/opt/mysqldb-check/bin", "size": 4096, "state": "directory", "uid": 1001} | |
TASK [mysql_db_check : Create a directory /opt/mysqldb-check/config/ if it does not exist] *** | |
[0;33mchanged: [db-check] => {"ansible_facts": {}, "changed": true, "gid": 1001, "group": "mysqldb-check-test", "mode": "0755", "owner": "mysqldb-check", "path": "/opt/mysqldb-check/config", "size": 4096, "state": "directory", "uid": 1001} | |
TASK [mysql_db_check : Download Mysqldbcheck] ********************************** | |
[0;33mchanged: [db-check] => {"ansible_facts": {}, "changed": true, "checksum_dest": null, "checksum_src": "aa78532d520cf2f82ccc587af851596c0d17d08c", "dest": "/opt/mysqldb-check/bin/mysql-check", "elapsed": 2, "gid": 1001, "group": "mysqldb-check-test", "md5sum": "0b5a84cf51fcf79480b4f36b4c88153b", "mode": "0744", "msg": "OK (1818876 bytes)", "owner": "mysqldb-check", "size": 1818876, "src": "/root/.ansible/tmp/ansible-moduletmp-1615678536.22-8O4DJn/tmpAVXRZn", "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 Mysqldbcheck Configuration File] ******************* | |
[0;33mchanged: [db-check] => {"changed": true, "checksum": "1884b73b4cb8e1850fc34f9cbf81793c0a5a44ec", "dest": "/opt/mysqldb-check/config/mysqldb-check.conf", "gid": 1001, "group": "mysqldb-check-test", "md5sum": "da77ec806a98e6979e94a77fbb43fa58", "mode": "0644", "owner": "mysqldb-check", "size": 10, "src": "/root/.ansible/tmp/ansible_mitogen_action_7c67325aeda1afea/source", "state": "file", "uid": 1001} | |
TASK [mysql_db_check : Copy Mysqldbcheck Service File] ************************* | |
[0;33mchanged: [db-check] => {"changed": true, "checksum": "aa2098cc7af2dbe733a818af1030596b0050cb60", "dest": "/usr/lib/systemd/system/mysqldb-check.service", "gid": 0, "group": "root", "md5sum": "568382f38ed99d9c3173250e4695a0ba", "mode": "0644", "owner": "root", "size": 309, "src": "/root/.ansible/tmp/ansible_mitogen_action_8a60cf5d964e93d1/source", "state": "file", "uid": 0} | |
TASK [mysql_db_check : Enable and start Mysqldbcheck service] ****************** | |
[0;33mchanged: [db-check] => {"ansible_facts": {}, "changed": true, "enabled": true, "name": "mysqldb-check", "state": "started", "status": {"ActiveEnterTimestampMonotonic": "0", "ActiveExitTimestampMonotonic": "0", "ActiveState": "inactive", "After": "basic.target network.target systemd-journald.socket system.slice", "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 WebApp Server", "DevicePolicy": "auto", "EnvironmentFile": "/opt/mysqldb-check/config/mysqldb-check.conf (ignore_errors=yes)", "ExecMainCode": "0", "ExecMainExitTimestampMonotonic": "0", "ExecMainPID": "0", "ExecMainStartTimestampMonotonic": "0", "ExecMainStatus": "0", "ExecStart": "{ path=/opt/mysqldb-check/bin/mysql-check ; argv[]=/opt/mysqldb-check/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": "/usr/lib/systemd/system/mysqldb-check.service", "Group": "mysqldb-check-test", "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"}} | |
TASK [mysql_db_check : Wait for start] ***************************************** | |
[0;32mok: [db-check] => {"ansible_facts": {}, "changed": false, "elapsed": 0, "match_groupdict": {}, "match_groups": [], "path": null, "port": 8081, "search_regex": null, "state": "started"} | |
RUNNING HANDLER [mysql_db_check : mysqldb-check restart] *********************** | |
[0;33mchanged: [db-check] => {"ansible_facts": {}, "changed": true, "name": "mysqldb-check", "state": "started", "status": {"ActiveEnterTimestamp": "Sat 2021-03-13 23:35:43 UTC", "ActiveEnterTimestampMonotonic": "356436497098", "ActiveExitTimestampMonotonic": "0", "ActiveState": "active", "After": "systemd-journald.socket system.slice network.target basic.target", "AllowIsolate": "no", "AmbientCapabilities": "0", "AssertResult": "yes", "AssertTimestamp": "Sat 2021-03-13 23:35:43 UTC", "AssertTimestampMonotonic": "356436496386", "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 23:35:43 UTC", "ConditionTimestampMonotonic": "356436496386", "Conflicts": "shutdown.target", "ControlGroup": "/docker/73bdd587237d53b9303d3707a21fa81e134df137092999ed6595bfc2c7d1b4ab/system.slice/mysqldb-check.service", "ControlPID": "0", "DefaultDependencies": "yes", "Delegate": "no", "Description": "Simple WebApp Server", "DevicePolicy": "auto", "EnvironmentFile": "/opt/mysqldb-check/config/mysqldb-check.conf (ignore_errors=yes)", "ExecMainCode": "0", "ExecMainExitTimestampMonotonic": "0", "ExecMainPID": "2266", "ExecMainStartTimestamp": "Sat 2021-03-13 23:35:43 UTC", "ExecMainStartTimestampMonotonic": "356436497020", "ExecMainStatus": "0", "ExecStart": "{ path=/opt/mysqldb-check/bin/mysql-check ; argv[]=/opt/mysqldb-check/bin/mysql-check ; ignore_errors=no ; start_time=[Sat 2021-03-13 23:35:43 UTC] ; stop_time=[n/a] ; pid=2266 ; 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": "/usr/lib/systemd/system/mysqldb-check.service", "Group": "mysqldb-check-test", "GuessMainPID": "yes", "IOScheduling": "4", "Id": "mysqldb-check.service", "IgnoreOnIsolate": "no", "IgnoreOnSnapshot": "no", "IgnoreSIGPIPE": "yes", "InactiveEnterTimestampMonotonic": "0", "InactiveExitTimestamp": "Sat 2021-03-13 23:35:43 UTC", "InactiveExitTimestampMonotonic": "356436497098", "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": "2266", "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": "Sat 2021-03-13 23:35:43 UTC", "WatchdogTimestampMonotonic": "356436497069", "WatchdogUSec": "0"}} | |
PLAY RECAP ********************************************************************* | |
[0;33mdb-check : [0;32mok=15 [0;33mchanged=12 unreachable=0 failed=0 [0;36mskipped=1 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/13 23:36:38 ✗ [2.3 MySQL DB Check] -> rollout (Not ROOT) | |
2021/03/13 23:36:38 Result: exit status 7 | |
2021/03/13 23:36:38 Output: | |
db-check | |
0df3b0cc9601f3a78d9860ac7d47e90cc732d8103cfe5d9a9f3f0384e0e934da | |
[0;34mNo config file found; using defaults | |
PLAY [db-check] **************************************************************** | |
TASK [base : install epel] ***************************************************** | |
[0;32mok: [db-check] => {"ansible_facts": {"discovered_interpreter_python": "/usr/bin/python"}, "changed": false, "msg": "", "rc": 0, "results": ["epel-release-7-11.noarch providing epel-release is already installed"]} | |
TASK [base : install soft] ***************************************************** | |
[0;33mchanged: [db-check] => {"ansible_facts": {}, "changed": true, "changes": {"installed": ["python-devel", "wget"]}, "msg": "", "rc": 0, "results": ["python2-pip-8.1.2-8.el7.noarch providing python-pip is already installed", "curl-7.29.0-51.el7.x86_64 providing curl is already installed", "iproute-4.11.0-14.el7.x86_64 providing iproute is already installed", "sudo-1.8.23-3.el7.x86_64 providing sudo is already installed", "Loaded plugins: fastestmirror, ovl\nDetermining fastest mirrors\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 python-devel.x86_64 0:2.7.5-90.el7 will be installed\n--> Processing Dependency: python(x86-64) = 2.7.5-90.el7 for package: python-devel-2.7.5-90.el7.x86_64\n--> Processing Dependency: python2-rpm-macros > 3-30 for package: python-devel-2.7.5-90.el7.x86_64\n--> Processing Dependency: python-rpm-macros > 3-30 for package: python-devel-2.7.5-90.el7.x86_64\n---> Package wget.x86_64 0:1.14-18.el7_6.1 will be installed\n--> Running transaction check\n---> Package python.x86_64 0:2.7.5-77.el7_6 will be updated\n---> Package python.x86_64 0:2.7.5-90.el7 will be an update\n--> Processing Dependency: python-libs(x86-64) = 2.7.5-90.el7 for package: python-2.7.5-90.el7.x86_64\n---> Package python-rpm-macros.noarch 0:3-34.el7 will be installed\n--> Processing Dependency: python-srpm-macros for package: python-rpm-macros-3-34.el7.noarch\n---> Package python2-rpm-macros.noarch 0:3-34.el7 will be installed\n--> Running transaction check\n---> Package python-libs.x86_64 0:2.7.5-77.el7_6 will be updated\n---> Package python-libs.x86_64 0:2.7.5-90.el7 will be an update\n---> Package python-srpm-macros.noarch 0:3-34.el7 will be installed\n--> Finished Dependency Resolution\n\nDependencies Resolved\n\n================================================================================\n Package Arch Version Repository Size\n================================================================================\nInstalling:\n python-devel x86_64 2.7.5-90.el7 updates 399 k\n wget x86_64 1.14-18.el7_6.1 base 547 k\nInstalling for dependencies:\n python-rpm-macros noarch 3-34.el7 base 9.1 k\n python-srpm-macros noarch 3-34.el7 base 8.8 k\n python2-rpm-macros noarch 3-34.el7 base 8.1 k\nUpdating for dependencies:\n python x86_64 2.7.5-90.el7 updates 96 k\n python-libs x86_64 2.7.5-90.el7 updates 5.6 M\n\nTransaction Summary\n================================================================================\nInstall 2 Packages (+3 Dependent packages)\nUpgrade ( 2 Dependent packages)\n\nTotal download size: 6.7 M\nDownloading packages:\nNo Presto metadata available for updates\n--------------------------------------------------------------------------------\nTotal 9.9 MB/s | 6.7 MB 00:00 \nRunning transaction check\nRunning transaction test\nTransaction test succeeded\nRunning transaction\n Updating : python-libs-2.7.5-90.el7.x86_64 1/9 \n Updating : python-2.7.5-90.el7.x86_64 2/9 \n Installing : python-srpm-macros-3-34.el7.noarch 3/9 \n Installing : python-rpm-macros-3-34.el7.noarch 4/9 \n Installing : python2-rpm-macros-3-34.el7.noarch 5/9 \n Installing : python-devel-2.7.5-90.el7.x86_64 6/9 \n Installing : wget-1.14-18.el7_6.1.x86_64 7/9 \ninstall-info: No such file or directory for /usr/share/info/wget.info.gz\n Cleanup : python-2.7.5-77.el7_6.x86_64 8/9 \n Cleanup : python-libs-2.7.5-77.el7_6.x86_64 9/9 \n Verifying : python2-rpm-macros-3-34.el7.noarch 1/9 \n Verifying : python-libs-2.7.5-90.el7.x86_64 2/9 \n Verifying : python-devel-2.7.5-90.el7.x86_64 3/9 \n Verifying : python-2.7.5-90.el7.x86_64 4/9 \n Verifying : python-rpm-macros-3-34.el7.noarch 5/9 \n Verifying : wget-1.14-18.el7_6.1.x86_64 6/9 \n Verifying : python-srpm-macros-3-34.el7.noarch 7/9 \n Verifying : python-2.7.5-77.el7_6.x86_64 8/9 \n Verifying : python-libs-2.7.5-77.el7_6.x86_64 9/9 \n\nInstalled:\n python-devel.x86_64 0:2.7.5-90.el7 wget.x86_64 0:1.14-18.el7_6.1 \n\nDependency Installed:\n python-rpm-macros.noarch 0:3-34.el7 python-srpm-macros.noarch 0:3-34.el7 \n python2-rpm-macros.noarch 0:3-34.el7 \n\nDependency Updated:\n python.x86_64 0:2.7.5-90.el7 python-libs.x86_64 0:2.7.5-90.el7 \n\nComplete!\n"]} | |
TASK [base : Ensure directory for ansible facts exists] ************************ | |
[0;33mchanged: [db-check] => {"ansible_facts": {}, "changed": true, "gid": 0, "group": "root", "mode": "0755", "owner": "root", "path": "/etc/ansible/facts.d/", "size": 4096, "state": "directory", "uid": 0} | |
TASK [user : Create {{ group_name }} Group] ************************************ | |
[0;33mchanged: [db-check] => {"ansible_facts": {}, "changed": true, "gid": 1001, "name": "mysqldb-check", "state": "present", "system": false} | |
TASK [user : Add user "mysqldb-check"] ***************************************** | |
[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 [user : Allow specified users to sudo] ************************************ | |
[0;36mskipping: [db-check] => {"changed": false, "skip_reason": "Conditional result was False"} | |
TASK [mysql_db_check : Create {{ group_name }} Group] ************************** | |
[0;32mok: [db-check] => {"ansible_facts": {}, "changed": false, "gid": 1001, "name": "mysqldb-check", "state": "present", "system": false} | |
TASK [mysql_db_check : Add user "user"] **************************************** | |
[0;32mok: [db-check] => {"ansible_facts": {}, "append": false, "changed": false, "comment": "", "group": 1001, "home": "/home/mysqldb-check", "move_home": false, "name": "mysqldb-check", "shell": "/bin/sh", "state": "present", "uid": 1001} | |
TASK [mysql_db_check : Create a directory /opt/mysqldb-check/bin/ if it does not exist] *** | |
[0;33mchanged: [db-check] => {"ansible_facts": {}, "changed": true, "gid": 1001, "group": "mysqldb-check", "mode": "0755", "owner": "mysqldb-check", "path": "/opt/mysqldb-check/bin", "size": 4096, "state": "directory", "uid": 1001} | |
TASK [mysql_db_check : Create a directory /opt/mysqldb-check/config/ if it does not exist] *** | |
[0;33mchanged: [db-check] => {"ansible_facts": {}, "changed": true, "gid": 1001, "group": "mysqldb-check", "mode": "0755", "owner": "mysqldb-check", "path": "/opt/mysqldb-check/config", "size": 4096, "state": "directory", "uid": 1001} | |
TASK [mysql_db_check : Download Mysqldbcheck] ********************************** | |
[0;33mchanged: [db-check] => {"ansible_facts": {}, "changed": true, "checksum_dest": null, "checksum_src": "aa78532d520cf2f82ccc587af851596c0d17d08c", "dest": "/opt/mysqldb-check/bin/mysql-check", "elapsed": 0, "gid": 1001, "group": "mysqldb-check", "md5sum": "0b5a84cf51fcf79480b4f36b4c88153b", "mode": "0744", "msg": "OK (1818876 bytes)", "owner": "mysqldb-check", "size": 1818876, "src": "/root/.ansible/tmp/ansible-moduletmp-1615678591.2-_T8VV1/tmpLpOr8W", "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 Mysqldbcheck Configuration File] ******************* | |
[0;33mchanged: [db-check] => {"changed": true, "checksum": "1884b73b4cb8e1850fc34f9cbf81793c0a5a44ec", "dest": "/opt/mysqldb-check/config/mysqldb-check.conf", "gid": 1001, "group": "mysqldb-check", "md5sum": "da77ec806a98e6979e94a77fbb43fa58", "mode": "0644", "owner": "mysqldb-check", "size": 10, "src": "/root/.ansible/tmp/ansible_mitogen_action_4d472d838341126b/source", "state": "file", "uid": 1001} | |
TASK [mysql_db_check : Copy Mysqldbcheck Service File] ************************* | |
[0;33mchanged: [db-check] => {"changed": true, "checksum": "99943ced65052ec24a350f297a87cf38e7f5f37d", "dest": "/usr/lib/systemd/system/mysqldb-check.service", "gid": 0, "group": "root", "md5sum": "7f2933cb1aaa8c7b61c900c1c978ae04", "mode": "0644", "owner": "root", "size": 304, "src": "/root/.ansible/tmp/ansible_mitogen_action_d0a6977739b1bc93/source", "state": "file", "uid": 0} | |
TASK [mysql_db_check : Enable and start Mysqldbcheck service] ****************** | |
[0;33mchanged: [db-check] => {"ansible_facts": {}, "changed": true, "enabled": true, "name": "mysqldb-check", "state": "started", "status": {"ActiveEnterTimestampMonotonic": "0", "ActiveExitTimestampMonotonic": "0", "ActiveState": "inactive", "After": "systemd-journald.socket system.slice network.target 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 WebApp Server", "DevicePolicy": "auto", "EnvironmentFile": "/opt/mysqldb-check/config/mysqldb-check.conf (ignore_errors=yes)", "ExecMainCode": "0", "ExecMainExitTimestampMonotonic": "0", "ExecMainPID": "0", "ExecMainStartTimestampMonotonic": "0", "ExecMainStatus": "0", "ExecStart": "{ path=/opt/mysqldb-check/bin/mysql-check ; argv[]=/opt/mysqldb-check/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": "/usr/lib/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"}} | |
TASK [mysql_db_check : Wait for start] ***************************************** | |
[0;32mok: [db-check] => {"ansible_facts": {}, "changed": false, "elapsed": 0, "match_groupdict": {}, "match_groups": [], "path": null, "port": 8081, "search_regex": null, "state": "started"} | |
RUNNING HANDLER [mysql_db_check : mysqldb-check restart] *********************** | |
[0;33mchanged: [db-check] => {"ansible_facts": {}, "changed": true, "name": "mysqldb-check", "state": "started", "status": {"ActiveEnterTimestamp": "Sat 2021-03-13 23:36:36 UTC", "ActiveEnterTimestampMonotonic": "356489306316", "ActiveExitTimestampMonotonic": "0", "ActiveState": "active", "After": "basic.target network.target systemd-journald.socket system.slice", "AllowIsolate": "no", "AmbientCapabilities": "0", "AssertResult": "yes", "AssertTimestamp": "Sat 2021-03-13 23:36:36 UTC", "AssertTimestampMonotonic": "356489305188", "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": "yes", "ConditionTimestamp": "Sat 2021-03-13 23:36:36 UTC", "ConditionTimestampMonotonic": "356489305187", "Conflicts": "shutdown.target", "ControlGroup": "/docker/0df3b0cc9601f3a78d9860ac7d47e90cc732d8103cfe5d9a9f3f0384e0e934da/system.slice/mysqldb-check.service", "ControlPID": "0", "DefaultDependencies": "yes", "Delegate": "no", "Description": "Simple WebApp Server", "DevicePolicy": "auto", "EnvironmentFile": "/opt/mysqldb-check/config/mysqldb-check.conf (ignore_errors=yes)", "ExecMainCode": "0", "ExecMainExitTimestampMonotonic": "0", "ExecMainPID": "5491", "ExecMainStartTimestamp": "Sat 2021-03-13 23:36:36 UTC", "ExecMainStartTimestampMonotonic": "356489306222", "ExecMainStatus": "0", "ExecStart": "{ path=/opt/mysqldb-check/bin/mysql-check ; argv[]=/opt/mysqldb-check/bin/mysql-check ; ignore_errors=no ; start_time=[Sat 2021-03-13 23:36:36 UTC] ; stop_time=[n/a] ; pid=5491 ; 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": "/usr/lib/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": "Sat 2021-03-13 23:36:36 UTC", "InactiveExitTimestampMonotonic": "356489306316", "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": "5491", "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": "Sat 2021-03-13 23:36:36 UTC", "WatchdogTimestampMonotonic": "356489306279", "WatchdogUSec": "0"}} | |
PLAY RECAP ********************************************************************* | |
[0;33mdb-check : [0;32mok=15 [0;33mchanged=11 unreachable=0 failed=0 [0;36mskipped=1 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/13 23:37:03 ✗ [2.3 MySQL DB Check] -> idempotency check (Not ROOT) | |
2021/03/13 23:37:03 Result: exit status 7 | |
2021/03/13 23:37:03 Output: | |
(run, /tmp/students-2/sergey_kosolapov/day2/2.3) => ansible-playbook testing-role-mysqldb-check.yml -i db-check, -v -u devops | |
rc: 0 | |
output: | | |
[0;34mNo config file found; using defaults | |
PLAY [db-check] **************************************************************** | |
TASK [base : install epel] ***************************************************** | |
[0;32mok: [db-check] => {"ansible_facts": {"discovered_interpreter_python": "/usr/bin/python"}, "changed": false, "msg": "", "rc": 0, "results": ["epel-release-7-11.noarch providing epel-release is already installed"]} | |
TASK [base : install soft] ***************************************************** | |
[0;32mok: [db-check] => {"ansible_facts": {}, "changed": false, "msg": "", "rc": 0, "results": ["python-devel-2.7.5-90.el7.x86_64 providing python-devel is already installed", "python2-pip-8.1.2-8.el7.noarch providing python-pip is already installed", "curl-7.29.0-51.el7.x86_64 providing curl is already installed", "wget-1.14-18.el7_6.1.x86_64 providing wget is already installed", "iproute-4.11.0-14.el7.x86_64 providing iproute is already installed", "sudo-1.8.23-3.el7.x86_64 providing sudo is already installed"]} | |
TASK [base : Ensure directory for ansible facts exists] ************************ | |
[0;32mok: [db-check] => {"ansible_facts": {}, "changed": false, "gid": 0, "group": "root", "mode": "0755", "owner": "root", "path": "/etc/ansible/facts.d/", "size": 4096, "state": "directory", "uid": 0} | |
TASK [user : Create {{ group_name }} Group] ************************************ | |
[0;32mok: [db-check] => {"ansible_facts": {}, "changed": false, "gid": 1001, "name": "mysqldb-check", "state": "present", "system": false} | |
TASK [user : Add user "mysqldb-check"] ***************************************** | |
[0;32mok: [db-check] => {"ansible_facts": {}, "append": false, "changed": false, "comment": "", "group": 1001, "home": "/home/mysqldb-check", "move_home": false, "name": "mysqldb-check", "shell": "/bin/sh", "state": "present", "uid": 1001} | |
TASK [user : Allow specified users to sudo] ************************************ | |
[0;36mskipping: [db-check] => {"changed": false, "skip_reason": "Conditional result was False"} | |
TASK [mysql_db_check : Create {{ group_name }} Group] ************************** | |
[0;32mok: [db-check] => {"ansible_facts": {}, "changed": false, "gid": 1001, "name": "mysqldb-check", "state": "present", "system": false} | |
TASK [mysql_db_check : Add user "user"] **************************************** | |
[0;32mok: [db-check] => {"ansible_facts": {}, "append": false, "changed": false, "comment": "", "group": 1001, "home": "/home/mysqldb-check", "move_home": false, "name": "mysqldb-check", "shell": "/bin/sh", "state": "present", "uid": 1001} | |
TASK [mysql_db_check : Create a directory /opt/mysqldb-check/bin/ if it does not exist] *** | |
[0;32mok: [db-check] => {"ansible_facts": {}, "changed": false, "gid": 1001, "group": "mysqldb-check", "mode": "0755", "owner": "mysqldb-check", "path": "/opt/mysqldb-check/bin", "size": 4096, "state": "directory", "uid": 1001} | |
TASK [mysql_db_check : Create a directory /opt/mysqldb-check/config/ if it does not exist] *** | |
[0;32mok: [db-check] => {"ansible_facts": {}, "changed": false, "gid": 1001, "group": "mysqldb-check", "mode": "0755", "owner": "mysqldb-check", "path": "/opt/mysqldb-check/config", "size": 4096, "state": "directory", "uid": 1001} | |
TASK [mysql_db_check : Download Mysqldbcheck] ********************************** | |
[0;32mok: [db-check] => {"ansible_facts": {}, "changed": false, "checksum_dest": "aa78532d520cf2f82ccc587af851596c0d17d08c", "checksum_src": "aa78532d520cf2f82ccc587af851596c0d17d08c", "dest": "/opt/mysqldb-check/bin/mysql-check", "elapsed": 0, "gid": 1001, "group": "mysqldb-check", "md5sum": "0b5a84cf51fcf79480b4f36b4c88153b", "mode": "0744", "msg": "OK (1818876 bytes)", "owner": "mysqldb-check", "size": 1818876, "src": "/root/.ansible/tmp/ansible-moduletmp-1615678616.99-WKrQ8d/tmpckAFVK", "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 Mysqldbcheck Configuration File] ******************* | |
[0;32mok: [db-check] => {"changed": false, "checksum": "1884b73b4cb8e1850fc34f9cbf81793c0a5a44ec", "dest": "/opt/mysqldb-check/config/mysqldb-check.conf", "gid": 1001, "group": "mysqldb-check", "mode": "0644", "owner": "mysqldb-check", "path": "/opt/mysqldb-check/config/mysqldb-check.conf", "size": 10, "state": "file", "uid": 1001} | |
TASK [mysql_db_check : Copy Mysqldbcheck Service File] ************************* | |
[0;32mok: [db-check] => {"changed": false, "checksum": "99943ced65052ec24a350f297a87cf38e7f5f37d", "dest": "/usr/lib/systemd/system/mysqldb-check.service", "gid": 0, "group": "root", "mode": "0644", "owner": "root", "path": "/usr/lib/systemd/system/mysqldb-check.service", "size": 304, "state": "file", "uid": 0} | |
TASK [mysql_db_check : Enable and start Mysqldbcheck service] ****************** | |
[0;32mok: [db-check] => {"ansible_facts": {}, "changed": false, "enabled": true, "name": "mysqldb-check", "state": "started", "status": {"ActiveEnterTimestamp": "Sat 2021-03-13 23:36:37 UTC", "ActiveEnterTimestampMonotonic": "356491102307", "ActiveExitTimestamp": "Sat 2021-03-13 23:36:37 UTC", "ActiveExitTimestampMonotonic": "356491092815", "ActiveState": "active", "After": "basic.target network.target systemd-journald.socket system.slice", "AllowIsolate": "no", "AmbientCapabilities": "0", "AssertResult": "yes", "AssertTimestamp": "Sat 2021-03-13 23:36:37 UTC", "AssertTimestampMonotonic": "356491100517", "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": "yes", "ConditionTimestamp": "Sat 2021-03-13 23:36:37 UTC", "ConditionTimestampMonotonic": "356491100517", "Conflicts": "shutdown.target", "ControlGroup": "/docker/0df3b0cc9601f3a78d9860ac7d47e90cc732d8103cfe5d9a9f3f0384e0e934da/system.slice/mysqldb-check.service", "ControlPID": "0", "DefaultDependencies": "yes", "Delegate": "no", "Description": "Simple WebApp Server", "DevicePolicy": "auto", "EnvironmentFile": "/opt/mysqldb-check/config/mysqldb-check.conf (ignore_errors=yes)", "ExecMainCode": "0", "ExecMainExitTimestampMonotonic": "0", "ExecMainPID": "5560", "ExecMainStartTimestamp": "Sat 2021-03-13 23:36:37 UTC", "ExecMainStartTimestampMonotonic": "356491102210", "ExecMainStatus": "0", "ExecStart": "{ path=/opt/mysqldb-check/bin/mysql-check ; argv[]=/opt/mysqldb-check/bin/mysql-check ; ignore_errors=no ; start_time=[Sat 2021-03-13 23:36:37 UTC] ; stop_time=[n/a] ; pid=5560 ; code=(null) ; status=0/0 }", "ExecStop": "{ path=/bin/kill ; argv[]=/bin/kill -s QUIT $MAINPID ; ignore_errors=no ; start_time=[Sat 2021-03-13 23:36:37 UTC] ; stop_time=[Sat 2021-03-13 23:36:37 UTC] ; pid=5559 ; code=exited ; status=0 }", "FailureAction": "none", "FileDescriptorStoreMax": "0", "FragmentPath": "/usr/lib/systemd/system/mysqldb-check.service", "Group": "mysqldb-check", "GuessMainPID": "yes", "IOScheduling": "4", "Id": "mysqldb-check.service", "IgnoreOnIsolate": "no", "IgnoreOnSnapshot": "no", "IgnoreSIGPIPE": "yes", "InactiveEnterTimestamp": "Sat 2021-03-13 23:36:37 UTC", "InactiveEnterTimestampMonotonic": "356491099899", "InactiveExitTimestamp": "Sat 2021-03-13 23:36:37 UTC", "InactiveExitTimestampMonotonic": "356491102307", "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": "5560", "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": "Sat 2021-03-13 23:36:37 UTC", "WatchdogTimestampMonotonic": "356491102268", "WatchdogUSec": "0"}} | |
TASK [mysql_db_check : Wait for start] ***************************************** | |
[0;32mok: [db-check] => {"ansible_facts": {}, "changed": false, "elapsed": 0, "match_groupdict": {}, "match_groups": [], "path": null, "port": 8081, "search_regex": null, "state": "started"} | |
PLAY RECAP ********************************************************************* | |
[0;32mdb-check : [0;32mok=14 changed=0 unreachable=0 failed=0 [0;36mskipped=1 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/13 23:37:03 ----------------------------------------------------------------------------------- | |
2021/03/13 23:37:03 Tests Summary: | |
2021/03/13 23:37:03 8 (of 16) tests passed, 8 tests failed; rated as 50.00% | |
2021/03/13 23:37:03 | |
2021/03/13 23:37:03 Time Spent: 6m28.013s | |
2021/03/13 23:37:03 ----------------------------------------------------------------------------------- |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment