Skip to content

Instantly share code, notes, and snippets.

@sbeliakou
Created March 13, 2021 23:55
Show Gist options
  • Save sbeliakou/06a29411380c369f06e341a955e1e5a3 to your computer and use it in GitHub Desktop.
Save sbeliakou/06a29411380c369f06e341a955e1e5a3 to your computer and use it in GitHub Desktop.
Cloning into 'viachaslau_karpau'...
name: viachaslau_karpau, master/1bbf9f1 @ 2021-03-13 19:55:31 +0000
2021/03/13 23:37:19 config: tests/encryption.yml
2021/03/13 23:37:19 verbosity: 2
2021/03/13 23:37:19 -----------------------------------------------------------------------------------
2021/03/13 23:37:19 Running '2.1 Working with Secrets', 1..8 tests
2021/03/13 23:37:19 -----------------------------------------------------------------------------------
2021/03/13 23:37:19 ✓ [2.1 Working with Secrets] => 'spoiler1' decrypted correctly (1), 9ms
2021/03/13 23:37:19 ✓ [2.1 Working with Secrets] => 'spoiler2' decrypted correctly (1), 10ms
2021/03/13 23:37:19 ✓ [2.1 Working with Secrets] => 'spoiler3' decrypted correctly (1), 12ms
2021/03/13 23:37:19 ✓ [2.1 Working with Secrets] => 'spoiler4' decrypted correctly (1), 12ms
2021/03/13 23:37:21 ✓ [2.1 Working with Secrets] => 'secret1' encrypted with tag=dev (v1.2/AES256) (1), 25ms
2021/03/13 23:37:21 ✓ [2.1 Working with Secrets] => 'secret2' encrypted with tag=test (v1.2/AES256) (1), 19ms
2021/03/13 23:37:21 ✓ [2.1 Working with Secrets] => 'secret3' encrypted with tag=stage (v1.2/AES256) (1), 18ms
2021/03/13 23:37:21 ✓ [2.1 Working with Secrets] => 'secret4' encrypted with tag=prod (v1.2/AES256) (1), 24ms
2021/03/13 23:37:21 -----------------------------------------------------------------------------------
2021/03/13 23:37:21 Tests Summary:
2021/03/13 23:37:21 8 (of 8) tests passed, 0 tests failed; rated as 100.00%
2021/03/13 23:37:21
2021/03/13 23:37:21 Time Spent: 2.055s
2021/03/13 23:37:21 -----------------------------------------------------------------------------------
name: viachaslau_karpau, master/1bbf9f1 @ 2021-03-13 19:55:31 +0000
2021/03/13 23:37:21 config: tests/role-deps.yml
2021/03/13 23:37:21 verbosity: 2
2021/03/13 23:37:21 -----------------------------------------------------------------------------------
2021/03/13 23:37:21 Running '2.2 Role Dependencies', 1..17 tests
2021/03/13 23:37:21 -----------------------------------------------------------------------------------
2021/03/13 23:37:24 ✗ [2.2 Role Dependencies] -> 'base' linter
2021/03/13 23:37:24 Result: exit status 2
2021/03/13 23:37:24 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:1 Task/Handler: debug msg=running {{ role_name }} 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 failure(s), 0 warning(s) on 3 files.
2021/03/13 23:37:27 ✗ [2.2 Role Dependencies] -> 'java' linter
2021/03/13 23:37:27 Result: exit status 2
2021/03/13 23:37:27 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:1 Task/Handler: debug msg=running {{ role_name }} 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 failure(s), 0 warning(s) on 4 files.
2021/03/13 23:37:31 ✗ [2.2 Role Dependencies] -> 'tomcat' linter
2021/03/13 23:37:31 Result: exit status 2
2021/03/13 23:37:31 Output:
Added ANSIBLE_ROLES_PATH=~/.ansible/roles:/usr/share/ansible/roles:/etc/ansible/roles:roles
WARNING Listing 3 violation(s) that are fatal
unnamed-task: All tasks should be named
roles/tomcat/tasks/main.yml:1 Task/Handler: debug msg=running {{ role_name }} role
unnamed-task: All tasks should be named
roles/tomcat/tasks/main.yml:2 Task/Handler: debug msg=Java version {{ java_version }}
unnamed-task: All tasks should be named
roles/tomcat/tasks/main.yml:3 Task/Handler: debug msg=User name {{ user_name }}
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 3 failure(s), 0 warning(s) on 4 files.
2021/03/13 23:37:33 ✗ [2.2 Role Dependencies] -> 'nginx-base' linter
2021/03/13 23:37:33 Result: exit status 2
2021/03/13 23:37:33 Output:
Added ANSIBLE_ROLES_PATH=~/.ansible/roles:/usr/share/ansible/roles:/etc/ansible/roles:roles
WARNING Listing 2 violation(s) that are fatal
unnamed-task: All tasks should be named
roles/nginx-base/tasks/main.yml:1 Task/Handler: debug msg=running {{ role_name }} role
unnamed-task: All tasks should be named
roles/nginx-base/tasks/main.yml:2 Task/Handler: debug msg=Server name {{ server_name }} 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 2 failure(s), 0 warning(s) on 4 files.
2021/03/13 23:37:35 ✗ [2.2 Role Dependencies] -> 'nginx-custom' linter
2021/03/13 23:37:35 Result: exit status 2
2021/03/13 23:37:35 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-custom/tasks/main.yml:1 Task/Handler: debug msg=running {{ role_name }} 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 failure(s), 0 warning(s) on 4 files.
2021/03/13 23:37:37 ✗ [2.2 Role Dependencies] -> 'user' linter
2021/03/13 23:37:37 Result: exit status 2
2021/03/13 23:37:37 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:1 Task/Handler: debug msg=running {{ role_name }} 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 failure(s), 0 warning(s) on 3 files.
2021/03/13 23:37:37 ✓ [2.2 Role Dependencies] => 'tomcat' role depends on 'java' role (1), 9ms
2021/03/13 23:37:37 ✗ [2.2 Role Dependencies] -> 'tomcat' role calls 'java' role with 'java_version' parameter
2021/03/13 23:37:37 Result: exit status 1
2021/03/13 23:37:37 Output:
2021/03/13 23:37:37 ✓ [2.2 Role Dependencies] => 'tomcat' role depends on 'user' role (1), 8ms
2021/03/13 23:37:37 ✗ [2.2 Role Dependencies] -> 'tomcat' role calls 'user' role with 'user_name' parameter
2021/03/13 23:37:37 Result: exit status 1
2021/03/13 23:37:37 Output:
2021/03/13 23:37:37 ✗ [2.2 Role Dependencies] -> 'tomcat' role calls 'user' role with 'user_id' parameter
2021/03/13 23:37:37 Result: exit status 1
2021/03/13 23:37:37 Output:
2021/03/13 23:37:37 ✗ [2.2 Role Dependencies] -> 'tomcat' role calls 'user' role with 'group_id' parameter
2021/03/13 23:37:37 Result: exit status 1
2021/03/13 23:37:37 Output:
2021/03/13 23:37:37 ✗ [2.2 Role Dependencies] -> 'tomcat' role calls 'user' role with 'user_home' parameter
2021/03/13 23:37:37 Result: exit status 1
2021/03/13 23:37:37 Output:
2021/03/13 23:37:37 ✓ [2.2 Role Dependencies] => 'tomcat' role depends on 'base' role (1), 7ms
2021/03/13 23:37:37 ✓ [2.2 Role Dependencies] => 'java' role depends on 'base' role (1), 7ms
2021/03/13 23:37:37 ✓ [2.2 Role Dependencies] => 'nginx-base' role depends on 'base' role (1), 6ms
2021/03/13 23:37:37 ✓ [2.2 Role Dependencies] => 'nginx-custom' role depends on 'nginx-base' role (1), 7ms
2021/03/13 23:37:37 -----------------------------------------------------------------------------------
2021/03/13 23:37:37 Tests Summary:
2021/03/13 23:37:37 6 (of 17) tests passed, 11 tests failed; rated as 35.29%
2021/03/13 23:37:37
2021/03/13 23:37:37 Time Spent: 16.608s
2021/03/13 23:37:37 -----------------------------------------------------------------------------------
name: viachaslau_karpau, master/1bbf9f1 @ 2021-03-13 19:55:31 +0000
2021/03/13 23:37:37 config: tests/base.yml
2021/03/13 23:37:37 verbosity: 2
2021/03/13 23:37:37 -----------------------------------------------------------------------------------
2021/03/13 23:37:37 Running '2.3 Base Role (centos 7)', 1..11 tests
2021/03/13 23:37:37 -----------------------------------------------------------------------------------
2021/03/13 23:37:45 ✓ [2.3 Base Role (centos 7)] => Role Linter (1), 5.31s
2021/03/13 23:37:46 ✓ [2.3 Base Role (centos 7)] => playbook syntax check (1), 1.009s
2021/03/13 23:38:03 ✓ [2.3 Base Role (centos 7)] => apply role (5), 17.149s
2021/03/13 23:38:08 ✓ [2.3 Base Role (centos 7)] => idempotence check (apply the role twice) (5), 5.32s
2021/03/13 23:38:08 ✗ [2.3 Base Role (centos 7)] -> role installs 'epel' repo
2021/03/13 23:38:08 Result: exit status 1
2021/03/13 23:38:08 Output:
2021/03/13 23:38:08 ✗ [2.3 Base Role (centos 7)] -> role installs 'curl' package
2021/03/13 23:38:08 Result: exit status 1
2021/03/13 23:38:08 Output:
2021/03/13 23:38:08 ✗ [2.3 Base Role (centos 7)] -> role installs 'wget' package
2021/03/13 23:38:08 Result: exit status 1
2021/03/13 23:38:08 Output:
2021/03/13 23:38:08 ✗ [2.3 Base Role (centos 7)] -> role installs 'sudo' package
2021/03/13 23:38:08 Result: exit status 1
2021/03/13 23:38:08 Output:
2021/03/13 23:38:08 ✗ [2.3 Base Role (centos 7)] -> role installs 'iproute' package
2021/03/13 23:38:08 Result: exit status 1
2021/03/13 23:38:08 Output:
2021/03/13 23:38:08 ✗ [2.3 Base Role (centos 7)] -> role installs 'python-pip' package
2021/03/13 23:38:08 Result: exit status 1
2021/03/13 23:38:08 Output:
2021/03/13 23:38:08 ✗ [2.3 Base Role (centos 7)] -> role creates ansible facts folder
2021/03/13 23:38:08 Result: exit status 1
2021/03/13 23:38:08 Output:
2021/03/13 23:38:09 -----------------------------------------------------------------------------------
2021/03/13 23:38:09 Tests Summary:
2021/03/13 23:38:09 4 (of 11) tests passed, 7 tests failed; rated as 63.16%
2021/03/13 23:38:09
2021/03/13 23:38:09 Time Spent: 31.943s
2021/03/13 23:38:09 -----------------------------------------------------------------------------------
name: viachaslau_karpau, master/1bbf9f1 @ 2021-03-13 19:55:31 +0000
2021/03/13 23:38:09 config: tests/user.yml
2021/03/13 23:38:09 verbosity: 2
2021/03/13 23:38:09 -----------------------------------------------------------------------------------
2021/03/13 23:38:09 Running '2.3 User Role (CentOS 7)', 1..17 tests
2021/03/13 23:38:09 -----------------------------------------------------------------------------------
2021/03/13 23:38:16 ✓ [2.3 User Role (CentOS 7)] => Role Linter (1), 5.308s
2021/03/13 23:38:18 ✓ [2.3 User Role (CentOS 7)] => playbook syntax check (1), 1.362s
2021/03/13 23:38:43 ✓ [2.3 User Role (CentOS 7)] => apply role (5), 23.224s
2021/03/13 23:39:00 ✓ [2.3 User Role (CentOS 7)] => idempotence check (apply role twice) (5), 16.941s
2021/03/13 23:39:00 ✓ [2.3 User Role (CentOS 7)] => use "user_name" varaible (1), 181ms
2021/03/13 23:39:00 ✓ [2.3 User Role (CentOS 7)] => use "user_name", "user_group" variables (1), 190ms
2021/03/13 23:39:00 ✓ [2.3 User Role (CentOS 7)] => use "user_name", "user_id", "user_group" variables (1), 159ms
2021/03/13 23:39:00 ✓ [2.3 User Role (CentOS 7)] => use "user_name", "user_id", "user_group", "user_gid" variables (1), 170ms
2021/03/13 23:39:01 ✓ [2.3 User Role (CentOS 7)] => use "user_home" variable (1), 206ms
2021/03/13 23:39:01 ✓ [2.3 User Role (CentOS 7)] => set correct home permissions (1), 171ms
2021/03/13 23:39:01 ✓ [2.3 User Role (CentOS 7)] => user owns its home directory (1), 173ms
2021/03/13 23:39:01 ✓ [2.3 User Role (CentOS 7)] => use "user_name" from play vars (1), 170ms
2021/03/13 23:39:01 ✓ [2.3 User Role (CentOS 7)] => doesn't create home dir if required (1), 319ms
2021/03/13 23:39:02 ✓ [2.3 User Role (CentOS 7)] => use "user_shell" variable (1), 198ms
2021/03/13 23:39:02 ✓ [2.3 User Role (CentOS 7)] => setting custom sudo priviliges (1), 224ms
2021/03/13 23:39:02 ✓ [2.3 User Role (CentOS 7)] => doesn't create sudo priviliges for all users (1), 214ms
2021/03/13 23:39:02 ✗ [2.3 User Role (CentOS 7)] -> setting custom sudo priviliges - checking validation parameter
2021/03/13 23:39:02 Result: exit status 1
2021/03/13 23:39:02 Output:
2021/03/13 23:39:04 -----------------------------------------------------------------------------------
2021/03/13 23:39:04 Tests Summary:
2021/03/13 23:39:04 16 (of 17) tests passed, 1 tests failed; rated as 96.00%
2021/03/13 23:39:04
2021/03/13 23:39:04 Time Spent: 54.999s
2021/03/13 23:39:04 -----------------------------------------------------------------------------------
name: viachaslau_karpau, master/1bbf9f1 @ 2021-03-13 19:55:31 +0000
2021/03/13 23:39:04 config: tests/webapp-server.yml
2021/03/13 23:39:04 verbosity: 2
2021/03/13 23:39:04 -----------------------------------------------------------------------------------
2021/03/13 23:39:04 Running '2.3 WebApp-Server Role (centos 7)', 1..17 tests
2021/03/13 23:39:04 -----------------------------------------------------------------------------------
2021/03/13 23:39:11 ✓ [2.3 WebApp-Server Role (centos 7)] => role linter (1), 5.036s
2021/03/13 23:39:12 ✓ [2.3 WebApp-Server Role (centos 7)] => playbook syntax check (1), 767ms
2021/03/13 23:39:33 ✓ [2.3 WebApp-Server Role (centos 7)] => apply role (5), 21.366s
2021/03/13 23:39:49 ✓ [2.3 WebApp-Server Role (centos 7)] => idempotence check (apply the role twice) (5), 15.87s
2021/03/13 23:39:49 ✗ [2.3 WebApp-Server Role (centos 7)] -> role depends on 'user' role
2021/03/13 23:39:49 Result: exit status 2
2021/03/13 23:39:49 Output:
grep: roles/webapp-server/meta/main.yml: No such file or directory
2021/03/13 23:39:49 ✗ [2.3 WebApp-Server Role (centos 7)] -> passing variables to 'user' role: 'webapp_server_user'
2021/03/13 23:39:49 Result: exit status 2
2021/03/13 23:39:49 Output:
grep: roles/webapp-server/meta/main.yml: No such file or directory
2021/03/13 23:39:49 ✗ [2.3 WebApp-Server Role (centos 7)] -> passing variables to 'user' role: 'webapp_server_group'
2021/03/13 23:39:49 Result: exit status 2
2021/03/13 23:39:49 Output:
grep: roles/webapp-server/meta/main.yml: No such file or directory
2021/03/13 23:39:49 ✓ [2.3 WebApp-Server Role (centos 7)] => service responds 200 (1), 194ms
2021/03/13 23:39:50 ✓ [2.3 WebApp-Server Role (centos 7)] => service is enabled (1), 204ms
2021/03/13 23:39:50 ✗ [2.3 WebApp-Server Role (centos 7)] -> service runs under proper user/group
2021/03/13 23:39:50 Result: exit status 1
2021/03/13 23:39:50 Output:
2021/03/13 23:39:50 ✗ [2.3 WebApp-Server Role (centos 7)] -> application user has no password set
2021/03/13 23:39:50 Result: exit status 1
2021/03/13 23:39:50 Output:
2021/03/13 23:40:09 ✗ [2.3 WebApp-Server Role (centos 7)] -> stress-test: updating server application
2021/03/13 23:40:09 Result: exit status 1
2021/03/13 23:40:09 Output:
No config file found; using defaults
PLAY [all] *********************************************************************
TASK [Gathering Facts] *********************************************************
ok: [default]
TASK [user : Create group for system user] *************************************
ok: [default] => {"ansible_facts": {}, "changed": false, "gid": 1001, "name": "webapp", "state": "present", "system": false}
TASK [user : Create system user] ***********************************************
ok: [default] => {"ansible_facts": {}, "append": false, "changed": false, "comment": "", "group": 1001, "home": "/home/webapp", "move_home": false, "name": "webapp", "shell": "/bin/sh", "state": "present", "uid": 1001}
TASK [user : Add user to sudoers] **********************************************
skipping: [default] => {"changed": false, "skip_reason": "Conditional result was False"}
TASK [webapp-server : Create webapp home directory] ****************************
ok: [default] => {"ansible_facts": {}, "changed": false, "gid": 1001, "group": "webapp", "mode": "0755", "owner": "webapp", "path": "/opt/webapp-server/", "size": 4096, "state": "directory", "uid": 1001}
TASK [webapp-server : Create bin subfolder] ************************************
ok: [default] => {"ansible_facts": {}, "changed": false, "gid": 1001, "group": "webapp", "mode": "0755", "owner": "webapp", "path": "/opt/webapp-server//bin", "size": 4096, "state": "directory", "uid": 1001}
TASK [webapp-server : Create configuration subfolder] **************************
ok: [default] => {"ansible_facts": {}, "changed": false, "gid": 1001, "group": "webapp", "mode": "0755", "owner": "webapp", "path": "/opt/webapp-server//conf", "size": 4096, "state": "directory", "uid": 1001}
TASK [webapp-server : Download webapp-server] **********************************
ok: [default] => {"ansible_facts": {}, "changed": false, "checksum_dest": "28f105a4ed1478f27001141888cb86efc7ace7aa", "checksum_src": "28f105a4ed1478f27001141888cb86efc7ace7aa", "dest": "/opt/webapp-server//bin/webapp-server", "elapsed": 5, "gid": 1001, "group": "webapp", "md5sum": "66e5a7366408e9db471e3e9586e01708", "mode": "0750", "msg": "OK (6213632 bytes)", "owner": "webapp", "size": 6213632, "src": "/root/.ansible/tmp/ansible-moduletmp-1615678799.63-rr6MkG/tmpELUaFD", "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] *********************************
ok: [default] => {"changed": false, "checksum": "4978ad0a937bdb64ef28f54459e2506bd6ddd44c", "dest": "/opt/webapp-server//conf/webapp-server.conf", "gid": 1001, "group": "webapp", "mode": "0644", "owner": "webapp", "path": "/opt/webapp-server//conf/webapp-server.conf", "size": 163, "state": "file", "uid": 1001}
TASK [webapp-server : Copy systemd file] ***************************************
ok: [default] => {"changed": false, "checksum": "1f38ca837d61cb1563d4139d4e1770ced4ba0854", "dest": "/etc/systemd/system/webapp-server.service", "gid": 0, "group": "root", "mode": "0644", "owner": "root", "path": "/etc/systemd/system/webapp-server.service", "size": 291, "state": "file", "uid": 0}
TASK [webapp-server : Start and enable webapp-server] **************************
ok: [default] => {"ansible_facts": {}, "changed": false, "enabled": true, "name": "webapp-server", "state": "started", "status": {"ActiveEnterTimestamp": "Sat 2021-03-13 23:39:33 UTC", "ActiveEnterTimestampMonotonic": "356666600239", "ActiveExitTimestamp": "Sat 2021-03-13 23:39:33 UTC", "ActiveExitTimestampMonotonic": "356666590956", "ActiveState": "active", "After": "basic.target systemd-journald.socket network.target system.slice", "AllowIsolate": "no", "AmbientCapabilities": "0", "AssertResult": "yes", "AssertTimestamp": "Sat 2021-03-13 23:39:33 UTC", "AssertTimestampMonotonic": "356666598973", "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:39:33 UTC", "ConditionTimestampMonotonic": "356666598973", "Conflicts": "shutdown.target", "ControlGroup": "/docker/1026a754824a0a0b47a16594d5700208f3b1697ebd21bb3e2825d3a799f4274f/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": "2156", "ExecMainStartTimestamp": "Sat 2021-03-13 23:39:33 UTC", "ExecMainStartTimestampMonotonic": "356666599922", "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:39:33 UTC] ; stop_time=[n/a] ; pid=2156 ; 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:39:33 UTC] ; stop_time=[Sat 2021-03-13 23:39:33 UTC] ; pid=2155 ; code=exited ; status=0 }", "FailureAction": "none", "FileDescriptorStoreMax": "0", "FragmentPath": "/etc/systemd/system/webapp-server.service", "Group": "webapp", "GuessMainPID": "yes", "IOScheduling": "4", "Id": "webapp-server.service", "IgnoreOnIsolate": "no", "IgnoreOnSnapshot": "no", "IgnoreSIGPIPE": "yes", "InactiveEnterTimestamp": "Sat 2021-03-13 23:39:33 UTC", "InactiveEnterTimestampMonotonic": "356666597841", "InactiveExitTimestamp": "Sat 2021-03-13 23:39:33 UTC", "InactiveExitTimestampMonotonic": "356666600239", "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": "2156", "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", "WantedBy": "multi-user.target", "Wants": "system.slice", "WatchdogTimestamp": "Sat 2021-03-13 23:39:33 UTC", "WatchdogTimestampMonotonic": "356666600199", "WatchdogUSec": "0"}}
PLAY RECAP *********************************************************************
default : ok=10  changed=0 unreachable=0 failed=0 skipped=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:40:09 GMT
< Content-Length: 197
< Content-Type: text/plain; charset=utf-8
<
{ [data not shown]
* Connection #0 to host localhost left intact
2021/03/13 23:40:35 ✗ [2.3 WebApp-Server Role (centos 7)] -> stress-test: changing application port
2021/03/13 23:40:35 Result: exit status 1
2021/03/13 23:40:35 Output:
centos7
82a33a9de227e5614566c206bb4a6a8f35be4aeaf001fc71c45aa4e4484eb29e
No config file found; using defaults
PLAY [all] *********************************************************************
TASK [Gathering Facts] *********************************************************
ok: [default]
TASK [user : Create group for system user] *************************************
changed: [default] => {"ansible_facts": {}, "changed": true, "gid": 1001, "name": "webapp", "state": "present", "system": false}
TASK [user : Create system user] ***********************************************
changed: [default] => {"ansible_facts": {}, "changed": true, "comment": "", "create_home": true, "group": 1001, "home": "/home/webapp", "name": "webapp", "shell": "/bin/sh", "state": "present", "system": false, "uid": 1001}
TASK [user : Add user to sudoers] **********************************************
skipping: [default] => {"changed": false, "skip_reason": "Conditional result was False"}
TASK [webapp-server : Create webapp home directory] ****************************
changed: [default] => {"ansible_facts": {}, "changed": true, "gid": 1001, "group": "webapp", "mode": "0755", "owner": "webapp", "path": "/opt/webapp-server/", "size": 4096, "state": "directory", "uid": 1001}
TASK [webapp-server : Create bin subfolder] ************************************
changed: [default] => {"ansible_facts": {}, "changed": true, "gid": 1001, "group": "webapp", "mode": "0755", "owner": "webapp", "path": "/opt/webapp-server//bin", "size": 4096, "state": "directory", "uid": 1001}
TASK [webapp-server : Create configuration subfolder] **************************
changed: [default] => {"ansible_facts": {}, "changed": true, "gid": 1001, "group": "webapp", "mode": "0755", "owner": "webapp", "path": "/opt/webapp-server//conf", "size": 4096, "state": "directory", "uid": 1001}
TASK [webapp-server : Download webapp-server] **********************************
changed: [default] => {"ansible_facts": {}, "changed": true, "checksum_dest": null, "checksum_src": "28f105a4ed1478f27001141888cb86efc7ace7aa", "dest": "/opt/webapp-server//bin/webapp-server", "elapsed": 0, "gid": 1001, "group": "webapp", "md5sum": "66e5a7366408e9db471e3e9586e01708", "mode": "0750", "msg": "OK (6213632 bytes)", "owner": "webapp", "size": 6213632, "src": "/root/.ansible/tmp/ansible-moduletmp-1615678828.72-2OhjAa/tmp51gj4L", "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] *********************************
changed: [default] => {"changed": true, "checksum": "27702f16bd52a27bbad260d0ec2678296657e75f", "dest": "/opt/webapp-server//conf/webapp-server.conf", "gid": 1001, "group": "webapp", "md5sum": "c71c5e4e28bdb7809cca25f9674040fa", "mode": "0644", "owner": "webapp", "size": 163, "src": "/root/.ansible/tmp/ansible_mitogen_action_f4b27957f11c5d89/source", "state": "file", "uid": 1001}
TASK [webapp-server : Copy systemd file] ***************************************
changed: [default] => {"changed": true, "checksum": "1f38ca837d61cb1563d4139d4e1770ced4ba0854", "dest": "/etc/systemd/system/webapp-server.service", "gid": 0, "group": "root", "md5sum": "d67c58b14e1ccb57633108693584e63b", "mode": "0644", "owner": "root", "size": 291, "src": "/root/.ansible/tmp/ansible_mitogen_action_4c1b1ee30bfb9559/source", "state": "file", "uid": 0}
TASK [webapp-server : Start and enable webapp-server] **************************
changed: [default] => {"ansible_facts": {}, "changed": true, "enabled": true, "name": "webapp-server", "state": "started", "status": {"ActiveEnterTimestampMonotonic": "0", "ActiveExitTimestampMonotonic": "0", "ActiveState": "inactive", "After": "system.slice systemd-journald.socket 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/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": "/etc/systemd/system/webapp-server.service", "Group": "webapp", "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", "Wants": "system.slice", "WatchdogTimestampMonotonic": "0", "WatchdogUSec": "0"}}
RUNNING HANDLER [webapp-server : webapp-server restart] ************************
changed: [default] => {"ansible_facts": {}, "changed": true, "name": "webapp-server", "state": "started", "status": {"ActiveEnterTimestamp": "Sat 2021-03-13 23:40:33 UTC", "ActiveEnterTimestampMonotonic": "356726531362", "ActiveExitTimestampMonotonic": "0", "ActiveState": "active", "After": "network.target basic.target systemd-journald.socket system.slice", "AllowIsolate": "no", "AmbientCapabilities": "0", "AssertResult": "yes", "AssertTimestamp": "Sat 2021-03-13 23:40:33 UTC", "AssertTimestampMonotonic": "356726530444", "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:40:33 UTC", "ConditionTimestampMonotonic": "356726530444", "Conflicts": "shutdown.target", "ControlGroup": "/docker/82a33a9de227e5614566c206bb4a6a8f35be4aeaf001fc71c45aa4e4484eb29e/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": "2074", "ExecMainStartTimestamp": "Sat 2021-03-13 23:40:33 UTC", "ExecMainStartTimestampMonotonic": "356726531288", "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:40:33 UTC] ; stop_time=[n/a] ; pid=2074 ; code=(null) ; status=0/0 }", "ExecStop": "{ path=/bin/kill ; argv[]=/bin/kill -s QUIT $MAINPID ; ignore_errors=no ; start_time=[n/a] ; stop_time=[n/a] ; pid=0 ; code=(null) ; status=0/0 }", "FailureAction": "none", "FileDescriptorStoreMax": "0", "FragmentPath": "/etc/systemd/system/webapp-server.service", "Group": "webapp", "GuessMainPID": "yes", "IOScheduling": "4", "Id": "webapp-server.service", "IgnoreOnIsolate": "no", "IgnoreOnSnapshot": "no", "IgnoreSIGPIPE": "yes", "InactiveEnterTimestampMonotonic": "0", "InactiveExitTimestamp": "Sat 2021-03-13 23:40:33 UTC", "InactiveExitTimestampMonotonic": "356726531362", "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": "2074", "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", "WantedBy": "multi-user.target", "Wants": "system.slice", "WatchdogTimestamp": "Sat 2021-03-13 23:40:33 UTC", "WatchdogTimestampMonotonic": "356726531331", "WatchdogUSec": "0"}}
RUNNING HANDLER [webapp-server : systemd reload] *******************************
changed: [default] => {"ansible_facts": {}, "changed": true, "name": "webapp-server", "state": "started", "status": {"ActiveEnterTimestamp": "Sat 2021-03-13 23:40:34 UTC", "ActiveEnterTimestampMonotonic": "356727197934", "ActiveExitTimestamp": "Sat 2021-03-13 23:40:34 UTC", "ActiveExitTimestampMonotonic": "356727185418", "ActiveState": "active", "After": "basic.target network.target system.slice systemd-journald.socket", "AllowIsolate": "no", "AmbientCapabilities": "0", "AssertResult": "yes", "AssertTimestamp": "Sat 2021-03-13 23:40:34 UTC", "AssertTimestampMonotonic": "356727195302", "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:40:34 UTC", "ConditionTimestampMonotonic": "356727195302", "Conflicts": "shutdown.target", "ControlGroup": "/docker/82a33a9de227e5614566c206bb4a6a8f35be4aeaf001fc71c45aa4e4484eb29e/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": "2112", "ExecMainStartTimestamp": "Sat 2021-03-13 23:40:34 UTC", "ExecMainStartTimestampMonotonic": "356727197299", "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": "/etc/systemd/system/webapp-server.service", "Group": "webapp", "GuessMainPID": "yes", "IOScheduling": "4", "Id": "webapp-server.service", "IgnoreOnIsolate": "no", "IgnoreOnSnapshot": "no", "IgnoreSIGPIPE": "yes", "InactiveEnterTimestamp": "Sat 2021-03-13 23:40:34 UTC", "InactiveEnterTimestampMonotonic": "356727194885", "InactiveExitTimestamp": "Sat 2021-03-13 23:40:34 UTC", "InactiveExitTimestampMonotonic": "356727197934", "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": "2112", "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", "WantedBy": "multi-user.target", "Wants": "system.slice", "WatchdogTimestamp": "Sat 2021-03-13 23:40:34 UTC", "WatchdogTimestampMonotonic": "356727197343", "WatchdogUSec": "0"}}
PLAY RECAP *********************************************************************
default : ok=12  changed=11  unreachable=0 failed=0 skipped=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:40:35 GMT
< Content-Length: 197
< Content-Type: text/plain; charset=utf-8
<
{ [data not shown]
* Connection #0 to host localhost left intact
2021/03/13 23:40:59 ✓ [2.3 WebApp-Server Role (centos 7)] => stress-test: changing student name (1), 23.951s
2021/03/13 23:41:21 ✓ [2.3 WebApp-Server Role (centos 7)] => stress-test: changing application home dir (1), 22.443s
2021/03/13 23:41:49 ✓ [2.3 WebApp-Server Role (centos 7)] => rollout (Not ROOT) (5), 27.857s
2021/03/13 23:42:07 ✓ [2.3 WebApp-Server Role (centos 7)] => idempotancy check (Not ROOT) (5), 17.578s
2021/03/13 23:42:08 -----------------------------------------------------------------------------------
2021/03/13 23:42:08 Tests Summary:
2021/03/13 23:42:08 10 (of 17) tests passed, 7 tests failed; rated as 78.79%
2021/03/13 23:42:08
2021/03/13 23:42:08 Time Spent: 3m3.351s
2021/03/13 23:42:08 -----------------------------------------------------------------------------------
name: viachaslau_karpau, master/1bbf9f1 @ 2021-03-13 19:55:31 +0000
2021/03/13 23:42:08 config: tests/mysqldb.yml
2021/03/13 23:42:08 verbosity: 2
2021/03/13 23:42:08 -----------------------------------------------------------------------------------
2021/03/13 23:42:08 Running '2.3 MysqlDB Role (CentOS 7)', 1..17 tests
2021/03/13 23:42:08 -----------------------------------------------------------------------------------
2021/03/13 23:42:12 ✗ [2.3 MysqlDB Role (CentOS 7)] -> 'mysql_db' role linter
2021/03/13 23:42:12 Result: exit status 2
2021/03/13 23:42:12 Output:
Added ANSIBLE_ROLES_PATH=~/.ansible/roles:/usr/share/ansible/roles:/etc/ansible/roles:roles
WARNING Listing 3 violation(s) that are fatal
command-instead-of-shell: Use shell only when shell functionality is required
roles/mysql_db/tasks/main.yml:14 Task/Handler: Let loggin into MySQL without password
no-handler: Tasks that run when changed should likely be handlers
roles/mysql_db/tasks/main.yml:14 Task/Handler: Let loggin into MySQL without password
no-handler: Tasks that run when changed should likely be handlers
roles/mysql_db/tasks/main.yml:27 Task/Handler: Change MySQL root password
You can skip specific rules or tags by adding them to your configuration file:
# .ansible-lint
warn_list: # or 'skip_list' to silence them completely
- command-instead-of-shell # Use shell only when shell functionality is required
- no-handler # Tasks that run when changed should likely be handlers
Finished with 3 failure(s), 0 warning(s) on 10 files.
2021/03/13 23:42:15 ✓ [2.3 MysqlDB Role (CentOS 7)] => 'mysql_db_user' role linter (1), 2.943s
2021/03/13 23:42:16 ✓ [2.3 MysqlDB Role (CentOS 7)] => playbook syntax check (1), 985ms
2021/03/13 23:45:29 ✓ [2.3 MysqlDB Role (CentOS 7)] => running role-mysqldb.yml playbook (1), 3m13.447s
2021/03/13 23:48:52 ✓ [2.3 MysqlDB Role (CentOS 7)] => apply 'mysql_db' role (1), 3m22.247s
2021/03/13 23:49:03 ✓ [2.3 MysqlDB Role (CentOS 7)] => apply 'mysql_db' role again (1), 10.675s
2021/03/13 23:49:13 ✓ [2.3 MysqlDB Role (CentOS 7)] => apply 'mysql_db_user' role (1), 10.623s
2021/03/13 23:49:24 ✗ [2.3 MysqlDB Role (CentOS 7)] -> apply 'mysql_db_user' role again
2021/03/13 23:49:24 Result: exit status 1
2021/03/13 23:49:24 Output:
No config file found; using defaults
PLAY [db] **********************************************************************
TASK [base : Create ansible facts folder path=/etc/ansible_facts, state=directory] ***
ok: [db] => {"ansible_facts": {"discovered_interpreter_python": "/usr/bin/python"}, "changed": false, "gid": 0, "group": "root", "mode": "0755", "owner": "root", "path": "/etc/ansible_facts", "size": 4096, "state": "directory", "uid": 0}
TASK [base : Gather ansible facts fact_path=/etc/ansible_facts] ****************
ok: [db]
TASK [base : Install MySQL-python name=MySQL-python] ***************************
ok: [db] => {"ansible_facts": {}, "changed": false, "msg": "", "rc": 0, "results": ["MySQL-python-1.2.5-1.el7.x86_64 providing MySQL-python is already installed"]}
TASK [mysql_db : Add MySQL Yum repository name=https://repo.mysql.com/mysql80-community-release-el7-3.noarch.rpm, state=present] ***
ok: [db] => {"ansible_facts": {}, "changed": false, "msg": "", "rc": 0, "results": ["mysql80-community-release-el7-3.noarch providing /root/.ansible/tmp/ansible-moduletmp-1615679360.53-5ef_XU/mysql80-community-release-el7-3.noarchDeXk7D.rpm is already installed"]}
TASK [mysql_db : Install MySQL name=mysql-community-server, enablerepo=mysql80-community] ***
ok: [db] => {"ansible_facts": {}, "changed": false, "msg": "", "rc": 0, "results": ["mysql-community-server-8.0.23-1.el7.x86_64 providing mysql-community-server is already installed"]}
TASK [mysql_db : Let loggin into MySQL without password _raw_params=mysqld --default-authentication-plugin=mysql_native_password --initialize-insecure --user=mysql] ***
skipping: [db] => {"changed": false, "skip_reason": "Conditional result was False"}
TASK [mysql_db : Start and enable MySQL name=mysqld, state=started, enabled=True] ***
ok: [db] => {"ansible_facts": {}, "changed": false, "enabled": true, "name": "mysqld", "state": "started", "status": {"ActiveEnterTimestamp": "Sat 2021-03-13 23:48:51 UTC", "ActiveEnterTimestampMonotonic": "357224578257", "ActiveExitTimestampMonotonic": "0", "ActiveState": "active", "After": "systemd-journald.socket system.slice basic.target syslog.target network.target", "AllowIsolate": "no", "AmbientCapabilities": "0", "AssertResult": "yes", "AssertTimestamp": "Sat 2021-03-13 23:48:50 UTC", "AssertTimestampMonotonic": "357223149999", "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:48:50 UTC", "ConditionTimestampMonotonic": "357223149998", "Conflicts": "shutdown.target", "ControlGroup": "/docker/f1cac7c0544a53796e46994ffe64a0fe4c1ec20f8aa1b844a76b9e444a5ea538/system.slice/mysqld.service", "ControlPID": "0", "DefaultDependencies": "yes", "Delegate": "no", "Description": "MySQL Server", "DevicePolicy": "auto", "Documentation": "man:mysqld(8) http://dev.mysql.com/doc/refman/en/using-systemd.html", "Environment": "MYSQLD_PARENT_PID=1", "EnvironmentFile": "/etc/sysconfig/mysql (ignore_errors=yes)", "ExecMainCode": "0", "ExecMainExitTimestampMonotonic": "0", "ExecMainPID": "7002", "ExecMainStartTimestamp": "Sat 2021-03-13 23:48:50 UTC", "ExecMainStartTimestampMonotonic": "357223232813", "ExecMainStatus": "0", "ExecStart": "{ path=/usr/sbin/mysqld ; argv[]=/usr/sbin/mysqld $MYSQLD_OPTS ; ignore_errors=no ; start_time=[Sat 2021-03-13 23:48:50 UTC] ; stop_time=[n/a] ; pid=7002 ; code=(null) ; status=0/0 }", "ExecStartPre": "{ path=/usr/bin/mysqld_pre_systemd ; argv[]=/usr/bin/mysqld_pre_systemd ; ignore_errors=no ; start_time=[Sat 2021-03-13 23:48:50 UTC] ; stop_time=[Sat 2021-03-13 23:48:50 UTC] ; pid=6981 ; code=exited ; status=0 }", "FailureAction": "none", "FileDescriptorStoreMax": "0", "FragmentPath": "/usr/lib/systemd/system/mysqld.service", "Group": "mysql", "GuessMainPID": "yes", "IOScheduling": "0", "Id": "mysqld.service", "IgnoreOnIsolate": "no", "IgnoreOnSnapshot": "no", "IgnoreSIGPIPE": "yes", "InactiveEnterTimestampMonotonic": "0", "InactiveExitTimestamp": "Sat 2021-03-13 23:48:50 UTC", "InactiveExitTimestampMonotonic": "357223151560", "JobTimeoutAction": "none", "JobTimeoutUSec": "0", "KillMode": "control-group", "KillSignal": "15", "LimitAS": "18446744073709551615", "LimitCORE": "18446744073709551615", "LimitCPU": "18446744073709551615", "LimitDATA": "18446744073709551615", "LimitFSIZE": "18446744073709551615", "LimitLOCKS": "18446744073709551615", "LimitMEMLOCK": "67108864", "LimitMSGQUEUE": "819200", "LimitNICE": "0", "LimitNOFILE": "10000", "LimitNPROC": "18446744073709551615", "LimitRSS": "18446744073709551615", "LimitRTPRIO": "0", "LimitRTTIME": "18446744073709551615", "LimitSIGPENDING": "29790", "LimitSTACK": "18446744073709551615", "LoadState": "loaded", "MainPID": "7002", "MemoryAccounting": "no", "MemoryCurrent": "18446744073709551615", "MemoryLimit": "18446744073709551615", "MountFlags": "0", "Names": "mysqld.service", "NeedDaemonReload": "no", "Nice": "0", "NoNewPrivileges": "no", "NonBlocking": "no", "NotifyAccess": "main", "OOMScoreAdjust": "0", "OnFailureJobMode": "replace", "PermissionsStartOnly": "yes", "PrivateDevices": "no", "PrivateNetwork": "no", "PrivateTmp": "no", "ProtectHome": "no", "ProtectSystem": "no", "RefuseManualStart": "no", "RefuseManualStop": "no", "RemainAfterExit": "no", "Requires": "basic.target", "Restart": "on-failure", "RestartUSec": "100ms", "Result": "success", "RootDirectoryStartOnly": "no", "RuntimeDirectoryMode": "0755", "SameProcessGroup": "no", "SecureBits": "0", "SendSIGHUP": "no", "SendSIGKILL": "yes", "Slice": "system.slice", "StandardError": "inherit", "StandardInput": "null", "StandardOutput": "journal", "StartLimitAction": "none", "StartLimitBurst": "5", "StartLimitInterval": "10000000", "StartupBlockIOWeight": "18446744073709551615", "StartupCPUShares": "18446744073709551615", "StatusErrno": "0", "StatusText": "Server is operational", "StopWhenUnneeded": "no", "SubState": "running", "SyslogLevelPrefix": "yes", "SyslogPriority": "30", "SystemCallErrorNumber": "0", "TTYReset": "no", "TTYVHangup": "no", "TTYVTDisallocate": "no", "TasksAccounting": "no", "TasksCurrent": "18446744073709551615", "TasksMax": "18446744073709551615", "TimeoutStartUSec": "0", "TimeoutStopUSec": "0", "TimerSlackNSec": "50000", "Transient": "no", "Type": "notify", "UMask": "0022", "UnitFilePreset": "disabled", "UnitFileState": "enabled", "User": "mysql", "WantedBy": "multi-user.target", "Wants": "system.slice", "WatchdogTimestamp": "Sat 2021-03-13 23:48:51 UTC", "WatchdogTimestampMonotonic": "357224578194", "WatchdogUSec": "0"}}
TASK [mysql_db : Change MySQL root password login_user=root, name=root, password={{ mysqldb_root_password | mandatory }}] ***
skipping: [db] => {"changed": false, "skip_reason": "Conditional result was False"}
TASK [mysql_db_user : Create MySQL user login_user=root, login_password={{ mysqldb_root_password }}, name={{ mysqldb_user }}, password={{ mysqldb_password }}, priv=*.*:ALL, host=%] ***
changed: [db] => {"ansible_facts": {}, "changed": true, "msg": "Privileges updated", "user": "jdoe"}
TASK [mysql_db_user : Create database login_user={{ mysqldb_user }}, login_password={{ mysqldb_password }}, name={{ mysqldb_database }}] ***
ok: [db] => {"ansible_facts": {}, "changed": false, "db": "jdoe_db", "db_list": ["jdoe_db"], "executed_commands": []}
PLAY RECAP *********************************************************************
db : ok=8  changed=1  unreachable=0 failed=0 skipped=2  rescued=0 ignored=0
2021-03-13 23:49:24,319 p=21161 u=root n=ansible | db : ok=8 changed=1 unreachable=0 failed=0 skipped=2 rescued=0 ignored=0
2021/03/13 23:49:24 ✓ [2.3 MysqlDB Role (CentOS 7)] => db service is enabled (1), 184ms
2021/03/13 23:49:24 ✓ [2.3 MysqlDB Role (CentOS 7)] => db service is active (1), 167ms
2021/03/13 23:49:25 ✓ [2.3 MysqlDB Role (CentOS 7)] => db service is running on 3306 (1), 177ms
2021/03/13 23:49:25 ✓ [2.3 MysqlDB Role (CentOS 7)] => db root password set (1), 185ms
2021/03/13 23:49:25 ✓ [2.3 MysqlDB Role (CentOS 7)] => custom db user (non-root) created (1), 225ms
2021/03/13 23:52:11 ✓ [2.3 MysqlDB Role (CentOS 7)] => apply 'mysql_db' role (Not ROOT) (1), 2m46.01s
2021/03/13 23:52:21 ✓ [2.3 MysqlDB Role (CentOS 7)] => apply 'mysql_db' role (Not ROOT) again (1), 9.585s
2021/03/13 23:52:32 ✓ [2.3 MysqlDB Role (CentOS 7)] => apply 'mysql_db_user' role (Not ROOT) (1), 11.181s
2021/03/13 23:52:42 ✗ [2.3 MysqlDB Role (CentOS 7)] -> apply 'mysql_db_user' role (Not ROOT) again
2021/03/13 23:52:42 Result: exit status 1
2021/03/13 23:52:42 Output:
PLAY [db] **********************************************************************
TASK [base : Create ansible facts folder] **************************************
ok: [db]
TASK [base : Gather ansible facts] *********************************************
ok: [db]
TASK [base : Install MySQL-python] *********************************************
ok: [db]
TASK [mysql_db : Add MySQL Yum repository] *************************************
ok: [db]
TASK [mysql_db : Install MySQL] ************************************************
ok: [db]
TASK [mysql_db : Let loggin into MySQL without password] ***********************
skipping: [db]
TASK [mysql_db : Start and enable MySQL] ***************************************
ok: [db]
TASK [mysql_db : Change MySQL root password] ***********************************
skipping: [db]
TASK [mysql_db_user : Create MySQL user] ***************************************
changed: [db]
TASK [mysql_db_user : Create database] *****************************************
ok: [db]
PLAY RECAP *********************************************************************
db : ok=8  changed=1  unreachable=0 failed=0 skipped=2  rescued=0 ignored=0
2021-03-13 23:52:42,830 p=27186 u=root n=ansible | db : ok=8 changed=1 unreachable=0 failed=0 skipped=2 rescued=0 ignored=0
2021/03/13 23:52:44 -----------------------------------------------------------------------------------
2021/03/13 23:52:44 Tests Summary:
2021/03/13 23:52:44 14 (of 17) tests passed, 3 tests failed; rated as 82.35%
2021/03/13 23:52:44
2021/03/13 23:52:44 Time Spent: 10m35.958s
2021/03/13 23:52:44 -----------------------------------------------------------------------------------
name: viachaslau_karpau, master/1bbf9f1 @ 2021-03-13 19:55:31 +0000
2021/03/13 23:52:44 config: tests/mysqldb-check.yml
2021/03/13 23:52:44 verbosity: 2
2021/03/13 23:52:44 -----------------------------------------------------------------------------------
2021/03/13 23:52:44 Running '2.3 MySQL DB Check', 1..16 tests
2021/03/13 23:52:44 -----------------------------------------------------------------------------------
2021/03/13 23:52:50 ✓ [2.3 MySQL DB Check] => 'mysql_db_check' role linter (1), 3.106s
2021/03/13 23:52:51 ✓ [2.3 MySQL DB Check] => 'role-mysqldb-check.yml' playbook syntax check (1), 1.043s
2021/03/13 23:53:12 ✓ [2.3 MySQL DB Check] => apply 'role-mysqldb-check.yml' playbook (1), 20.464s
2021/03/13 23:53:30 ✓ [2.3 MySQL DB Check] => apply 'mysql_db_check' role (default settings) (1), 18.737s
2021/03/13 23:53:31 ✓ [2.3 MySQL DB Check] => service responds 200 (after initial rollout) (1), 247ms
2021/03/13 23:53:43 ✓ [2.3 MySQL DB Check] => idempotency check (apply the role twice) (1), 12.247s
2021/03/13 23:53:43 ✓ [2.3 MySQL DB Check] => service responds 200 (after idempotancy check) (1), 148ms
2021/03/13 23:53:43 ✓ [2.3 MySQL DB Check] => service is enabled (1), 155ms
2021/03/13 23:53:43 ✓ [2.3 MySQL DB Check] => service runs under proper user/group (1), 309ms
2021/03/13 23:53:44 ✓ [2.3 MySQL DB Check] => application user has no password set (1), 197ms
2021/03/13 23:54:09 ✗ [2.3 MySQL DB Check] -> trying another application port
2021/03/13 23:54:09 Result: exit status 1
2021/03/13 23:54:09 Output:
db-check
7acf5bce329628ba65d8d0aa6eda0d89e7d166d47585eec66cceb026505b8a05
No config file found; using defaults
PLAY [db-check] ****************************************************************
TASK [user : Create group for system user] *************************************
changed: [db-check] => {"ansible_facts": {"discovered_interpreter_python": "/usr/bin/python"}, "changed": true, "gid": 1001, "name": "mysqldb-check", "state": "present", "system": false}
TASK [user : Create system user] ***********************************************
changed: [db-check] => {"ansible_facts": {}, "changed": true, "comment": "", "create_home": false, "group": 1001, "home": "/home/mysqldb-check", "name": "mysqldb-check", "shell": "/bin/sh", "state": "present", "system": false, "uid": 1001}
TASK [user : Add user to sudoers] **********************************************
skipping: [db-check] => {"changed": false, "skip_reason": "Conditional result was False"}
TASK [mysql_db_check : Create mysqdl-check home folder] ************************
changed: [db-check] => {"ansible_facts": {}, "changed": true, "gid": 1001, "group": "mysqldb-check", "mode": "0755", "owner": "mysqldb-check", "path": "/opt/mysqldb-check", "size": 4096, "state": "directory", "uid": 1001}
TASK [mysql_db_check : Create configuration subfolder] *************************
changed: [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 : Create bin subfolder] ***********************************
changed: [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 : Download mysqldb-check] *********************************
changed: [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", "md5sum": "0b5a84cf51fcf79480b4f36b4c88153b", "mode": "01356", "msg": "OK (1818876 bytes)", "owner": "mysqldb-check", "size": 1818876, "src": "/root/.ansible/tmp/ansible-moduletmp-1615679636.32-tduil4/tmpmgtiE6", "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 configuration file] ********************************
changed: [db-check] => {"changed": true, "checksum": "f05b9a9e6932dfdebf4f0fae8089b8fad1754a0e", "dest": "/opt/mysqldb-check/config/mysqldb.check.conf", "gid": 1001, "group": "mysqldb-check", "md5sum": "812b6e469881dc8c329d87c9906af6a5", "mode": "0644", "owner": "mysqldb-check", "size": 9, "src": "/root/.ansible/tmp/ansible_mitogen_action_668dedc861b60336/source", "state": "file", "uid": 1001}
TASK [mysql_db_check : Copy systemd file] **************************************
changed: [db-check] => {"changed": true, "checksum": "4467b7ed20f1a7ae6f486e040bdc6f7b52c1b62c", "dest": "/etc/systemd/system/mysqldb-check.service", "gid": 0, "group": "root", "md5sum": "20a87acf07e874835a39e17dcb9f34bd", "mode": "0644", "owner": "root", "size": 298, "src": "/root/.ansible/tmp/ansible_mitogen_action_71f55d349823a355/source", "state": "file", "uid": 0}
TASK [mysql_db_check : Start and enable mysqldb-check] *************************
changed: [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": "MySQL check app", "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": "/etc/systemd/system/mysqldb-check.service", "Group": "mysqldb-check", "GuessMainPID": "yes", "IOScheduling": "4", "Id": "mysqldb-check.service", "IgnoreOnIsolate": "no", "IgnoreOnSnapshot": "no", "IgnoreSIGPIPE": "yes", "InactiveEnterTimestampMonotonic": "0", "InactiveExitTimestampMonotonic": "0", "JobTimeoutAction": "none", "JobTimeoutUSec": "0", "KillMode": "control-group", "KillSignal": "15", "LimitAS": "18446744073709551615", "LimitCORE": "18446744073709551615", "LimitCPU": "18446744073709551615", "LimitDATA": "18446744073709551615", "LimitFSIZE": "18446744073709551615", "LimitLOCKS": "18446744073709551615", "LimitMEMLOCK": "67108864", "LimitMSGQUEUE": "819200", "LimitNICE": "0", "LimitNOFILE": "1048576", "LimitNPROC": "18446744073709551615", "LimitRSS": "18446744073709551615", "LimitRTPRIO": "0", "LimitRTTIME": "18446744073709551615", "LimitSIGPENDING": "29790", "LimitSTACK": "18446744073709551615", "LoadState": "loaded", "MainPID": "0", "MemoryAccounting": "no", "MemoryCurrent": "18446744073709551615", "MemoryLimit": "18446744073709551615", "MountFlags": "0", "Names": "mysqldb-check.service", "NeedDaemonReload": "no", "Nice": "0", "NoNewPrivileges": "no", "NonBlocking": "no", "NotifyAccess": "none", "OOMScoreAdjust": "0", "OnFailureJobMode": "replace", "PermissionsStartOnly": "no", "PrivateDevices": "no", "PrivateNetwork": "no", "PrivateTmp": "no", "ProtectHome": "no", "ProtectSystem": "no", "RefuseManualStart": "no", "RefuseManualStop": "no", "RemainAfterExit": "no", "Requires": "basic.target", "Restart": "no", "RestartUSec": "100ms", "Result": "success", "RootDirectoryStartOnly": "no", "RuntimeDirectoryMode": "0755", "SameProcessGroup": "no", "SecureBits": "0", "SendSIGHUP": "no", "SendSIGKILL": "yes", "Slice": "system.slice", "StandardError": "inherit", "StandardInput": "null", "StandardOutput": "journal", "StartLimitAction": "none", "StartLimitBurst": "5", "StartLimitInterval": "10000000", "StartupBlockIOWeight": "18446744073709551615", "StartupCPUShares": "18446744073709551615", "StatusErrno": "0", "StopWhenUnneeded": "no", "SubState": "dead", "SyslogLevelPrefix": "yes", "SyslogPriority": "30", "SystemCallErrorNumber": "0", "TTYReset": "no", "TTYVHangup": "no", "TTYVTDisallocate": "no", "TasksAccounting": "no", "TasksCurrent": "18446744073709551615", "TasksMax": "18446744073709551615", "TimeoutStartUSec": "1min 30s", "TimeoutStopUSec": "1min 30s", "TimerSlackNSec": "50000", "Transient": "no", "Type": "simple", "UMask": "0022", "UnitFilePreset": "disabled", "UnitFileState": "disabled", "User": "mysqldb-check", "Wants": "system.slice", "WatchdogTimestampMonotonic": "0", "WatchdogUSec": "0"}}
RUNNING HANDLER [mysql_db_check : mysqldb-check-restart] ***********************
changed: [db-check] => {"ansible_facts": {}, "changed": true, "name": "mysqldb-check", "state": "started", "status": {"ActiveEnterTimestamp": "Sat 2021-03-13 23:54:03 UTC", "ActiveEnterTimestampMonotonic": "357536244574", "ActiveExitTimestampMonotonic": "0", "ActiveState": "active", "After": "system.slice systemd-journald.socket network.target basic.target", "AllowIsolate": "no", "AmbientCapabilities": "0", "AssertResult": "yes", "AssertTimestamp": "Sat 2021-03-13 23:54:03 UTC", "AssertTimestampMonotonic": "357536243302", "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:54:03 UTC", "ConditionTimestampMonotonic": "357536243301", "Conflicts": "shutdown.target", "ControlGroup": "/docker/7acf5bce329628ba65d8d0aa6eda0d89e7d166d47585eec66cceb026505b8a05/system.slice/mysqldb-check.service", "ControlPID": "0", "DefaultDependencies": "yes", "Delegate": "no", "Description": "MySQL check app", "DevicePolicy": "auto", "EnvironmentFile": "/opt/mysqldb-check/config/mysqldb.check.conf (ignore_errors=yes)", "ExecMainCode": "0", "ExecMainExitTimestampMonotonic": "0", "ExecMainPID": "2012", "ExecMainStartTimestamp": "Sat 2021-03-13 23:54:03 UTC", "ExecMainStartTimestampMonotonic": "357536244463", "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:54:03 UTC] ; stop_time=[n/a] ; pid=2012 ; code=(null) ; status=0/0 }", "ExecStop": "{ path=/bin/kill ; argv[]=/bin/kill -s QUIT $MAINPID ; ignore_errors=no ; start_time=[n/a] ; stop_time=[n/a] ; pid=0 ; code=(null) ; status=0/0 }", "FailureAction": "none", "FileDescriptorStoreMax": "0", "FragmentPath": "/etc/systemd/system/mysqldb-check.service", "Group": "mysqldb-check", "GuessMainPID": "yes", "IOScheduling": "4", "Id": "mysqldb-check.service", "IgnoreOnIsolate": "no", "IgnoreOnSnapshot": "no", "IgnoreSIGPIPE": "yes", "InactiveEnterTimestampMonotonic": "0", "InactiveExitTimestamp": "Sat 2021-03-13 23:54:03 UTC", "InactiveExitTimestampMonotonic": "357536244574", "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": "2012", "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:54:03 UTC", "WatchdogTimestampMonotonic": "357536244537", "WatchdogUSec": "0"}}
RUNNING HANDLER [mysql_db_check : mysqldb-systemd-reload] **********************
changed: [db-check] => {"ansible_facts": {}, "changed": true, "name": "mysqldb-check", "state": "started", "status": {"ActiveEnterTimestamp": "Sat 2021-03-13 23:54:04 UTC", "ActiveEnterTimestampMonotonic": "357537235085", "ActiveExitTimestamp": "Sat 2021-03-13 23:54:04 UTC", "ActiveExitTimestampMonotonic": "357537220489", "ActiveState": "active", "After": "network.target system.slice systemd-journald.socket basic.target", "AllowIsolate": "no", "AmbientCapabilities": "0", "AssertResult": "yes", "AssertTimestamp": "Sat 2021-03-13 23:54:04 UTC", "AssertTimestampMonotonic": "357537234327", "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:54:04 UTC", "ConditionTimestampMonotonic": "357537234327", "Conflicts": "shutdown.target", "ControlGroup": "/docker/7acf5bce329628ba65d8d0aa6eda0d89e7d166d47585eec66cceb026505b8a05/system.slice/mysqldb-check.service", "ControlPID": "0", "DefaultDependencies": "yes", "Delegate": "no", "Description": "MySQL check app", "DevicePolicy": "auto", "EnvironmentFile": "/opt/mysqldb-check/config/mysqldb.check.conf (ignore_errors=yes)", "ExecMainCode": "0", "ExecMainExitTimestampMonotonic": "0", "ExecMainPID": "2062", "ExecMainStartTimestamp": "Sat 2021-03-13 23:54:04 UTC", "ExecMainStartTimestampMonotonic": "357537235007", "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": "/etc/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:54:04 UTC", "InactiveEnterTimestampMonotonic": "357537233707", "InactiveExitTimestamp": "Sat 2021-03-13 23:54:04 UTC", "InactiveExitTimestampMonotonic": "357537235085", "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": "2062", "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:54:04 UTC", "WatchdogTimestampMonotonic": "357537235056", "WatchdogUSec": "0"}}
PLAY RECAP *********************************************************************
db-check : ok=11  changed=11  unreachable=0 failed=0 skipped=1  rescued=0 ignored=0
* About to connect() to localhost port 8081 (#0)
* Trying 127.0.0.1...
* Connection refused
* Trying ::1...
* Failed to connect to ::1: Cannot assign requested address
* Failed connect to localhost:8081; Cannot assign requested address
* Closing connection 0
2021/03/13 23:54:31 ✓ [2.3 MySQL DB Check] => trying another application home dir (1), 22.068s
2021/03/13 23:54:56 ✓ [2.3 MySQL DB Check] => trying another application user (1), 25.63s
2021/03/13 23:55:20 ✓ [2.3 MySQL DB Check] => trying another application group (1), 23.695s
2021/03/13 23:55:43 ✓ [2.3 MySQL DB Check] => rollout (Not ROOT) (1), 22.589s
2021/03/13 23:55:54 ✓ [2.3 MySQL DB Check] => idempotency check (Not ROOT) (1), 11.329s
2021/03/13 23:55:54 -----------------------------------------------------------------------------------
2021/03/13 23:55:54 Tests Summary:
2021/03/13 23:55:54 15 (of 16) tests passed, 1 tests failed; rated as 93.75%
2021/03/13 23:55:54
2021/03/13 23:55:54 Time Spent: 3m10.889s
2021/03/13 23:55:54 -----------------------------------------------------------------------------------
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment