Skip to content

Instantly share code, notes, and snippets.

@sbeliakou
Created March 13, 2021 23:13
Show Gist options
  • Save sbeliakou/769f87290020b3f31d7f91d927ebfd50 to your computer and use it in GitHub Desktop.
Save sbeliakou/769f87290020b3f31d7f91d927ebfd50 to your computer and use it in GitHub Desktop.
Cloning into 'raman_rohau'...
name: raman_rohau, master/ad44df5 @ 2021-03-11 08:50:58 +0000
2021/03/13 22:51:32 config: tests/encryption.yml
2021/03/13 22:51:32 verbosity: 2
2021/03/13 22:51:32 -----------------------------------------------------------------------------------
2021/03/13 22:51:32 Running '2.1 Working with Secrets', 1..8 tests
2021/03/13 22:51:32 -----------------------------------------------------------------------------------
2021/03/13 22:51:32 ✓ [2.1 Working with Secrets] => 'spoiler1' decrypted correctly (1), 19ms
2021/03/13 22:51:32 ✓ [2.1 Working with Secrets] => 'spoiler2' decrypted correctly (1), 15ms
2021/03/13 22:51:32 ✓ [2.1 Working with Secrets] => 'spoiler3' decrypted correctly (1), 13ms
2021/03/13 22:51:32 ✓ [2.1 Working with Secrets] => 'spoiler4' decrypted correctly (1), 11ms
2021/03/13 22:51:34 ✓ [2.1 Working with Secrets] => 'secret1' encrypted with tag=dev (v1.2/AES256) (1), 61ms
2021/03/13 22:51:34 ✓ [2.1 Working with Secrets] => 'secret2' encrypted with tag=test (v1.2/AES256) (1), 26ms
2021/03/13 22:51:34 ✓ [2.1 Working with Secrets] => 'secret3' encrypted with tag=stage (v1.2/AES256) (1), 28ms
2021/03/13 22:51:34 ✓ [2.1 Working with Secrets] => 'secret4' encrypted with tag=prod (v1.2/AES256) (1), 33ms
2021/03/13 22:51:34 -----------------------------------------------------------------------------------
2021/03/13 22:51:34 Tests Summary:
2021/03/13 22:51:34 8 (of 8) tests passed, 0 tests failed; rated as 100.00%
2021/03/13 22:51:34
2021/03/13 22:51:34 Time Spent: 2.055s
2021/03/13 22:51:34 -----------------------------------------------------------------------------------
name: raman_rohau, master/ad44df5 @ 2021-03-11 08:50:58 +0000
2021/03/13 22:51:34 config: tests/role-deps.yml
2021/03/13 22:51:34 verbosity: 2
2021/03/13 22:51:34 -----------------------------------------------------------------------------------
2021/03/13 22:51:34 Running '2.2 Role Dependencies', 1..17 tests
2021/03/13 22:51:34 -----------------------------------------------------------------------------------
2021/03/13 22:51:38 ✗ [2.2 Role Dependencies] -> 'base' linter
2021/03/13 22:51:38 Result: exit status 2
2021/03/13 22:51:38 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:2 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 2 files.
2021/03/13 22:51:41 ✗ [2.2 Role Dependencies] -> 'java' linter
2021/03/13 22:51:41 Result: exit status 2
2021/03/13 22:51:41 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:2 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 22:51:44 ✗ [2.2 Role Dependencies] -> 'tomcat' linter
2021/03/13 22:51:44 Result: exit status 2
2021/03/13 22:51:44 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:2 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 5 files.
2021/03/13 22:51:48 ✗ [2.2 Role Dependencies] -> 'nginx-base' linter
2021/03/13 22:51:48 Result: exit status 2
2021/03/13 22:51:48 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:2 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 22:51:52 ✗ [2.2 Role Dependencies] -> 'nginx-custom' linter
2021/03/13 22:51:52 Result: exit status 2
2021/03/13 22:51:52 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:2 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 22:51:56 ✗ [2.2 Role Dependencies] -> 'user' linter
2021/03/13 22:51:56 Result: exit status 2
2021/03/13 22:51:56 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:2 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 2 files.
2021/03/13 22:51:56 ✓ [2.2 Role Dependencies] => 'tomcat' role depends on 'java' role (1), 10ms
2021/03/13 22:51:56 ✓ [2.2 Role Dependencies] => 'tomcat' role calls 'java' role with 'java_version' parameter (1), 9ms
2021/03/13 22:51:56 ✓ [2.2 Role Dependencies] => 'tomcat' role depends on 'user' role (1), 12ms
2021/03/13 22:51:56 ✓ [2.2 Role Dependencies] => 'tomcat' role calls 'user' role with 'user_name' parameter (1), 12ms
2021/03/13 22:51:56 ✓ [2.2 Role Dependencies] => 'tomcat' role calls 'user' role with 'user_id' parameter (1), 12ms
2021/03/13 22:51:56 ✓ [2.2 Role Dependencies] => 'tomcat' role calls 'user' role with 'group_id' parameter (1), 7ms
2021/03/13 22:51:56 ✓ [2.2 Role Dependencies] => 'tomcat' role calls 'user' role with 'user_home' parameter (1), 11ms
2021/03/13 22:51:56 ✓ [2.2 Role Dependencies] => 'tomcat' role depends on 'base' role (1), 10ms
2021/03/13 22:51:56 ✓ [2.2 Role Dependencies] => 'java' role depends on 'base' role (1), 6ms
2021/03/13 22:51:56 ✓ [2.2 Role Dependencies] => 'nginx-base' role depends on 'base' role (1), 8ms
2021/03/13 22:51:56 ✓ [2.2 Role Dependencies] => 'nginx-custom' role depends on 'nginx-base' role (1), 11ms
2021/03/13 22:51:56 -----------------------------------------------------------------------------------
2021/03/13 22:51:56 Tests Summary:
2021/03/13 22:51:56 11 (of 17) tests passed, 6 tests failed; rated as 64.71%
2021/03/13 22:51:56
2021/03/13 22:51:56 Time Spent: 21.821s
2021/03/13 22:51:56 -----------------------------------------------------------------------------------
name: raman_rohau, master/ad44df5 @ 2021-03-11 08:50:58 +0000
2021/03/13 22:51:56 config: tests/base.yml
2021/03/13 22:51:56 verbosity: 2
2021/03/13 22:51:56 -----------------------------------------------------------------------------------
2021/03/13 22:51:56 Running '2.3 Base Role (centos 7)', 1..11 tests
2021/03/13 22:51:56 -----------------------------------------------------------------------------------
2021/03/13 22:52:03 ✓ [2.3 Base Role (centos 7)] => Role Linter (1), 4.649s
2021/03/13 22:52:04 ✓ [2.3 Base Role (centos 7)] => playbook syntax check (1), 1.487s
2021/03/13 22:52:46 ✓ [2.3 Base Role (centos 7)] => apply role (5), 41.296s
2021/03/13 22:52:56 ✓ [2.3 Base Role (centos 7)] => idempotence check (apply the role twice) (5), 10.266s
2021/03/13 22:52:56 ✓ [2.3 Base Role (centos 7)] => role installs 'epel' repo (1), 8ms
2021/03/13 22:52:56 ✓ [2.3 Base Role (centos 7)] => role installs 'curl' package (1), 7ms
2021/03/13 22:52:56 ✓ [2.3 Base Role (centos 7)] => role installs 'wget' package (1), 8ms
2021/03/13 22:52:56 ✓ [2.3 Base Role (centos 7)] => role installs 'sudo' package (1), 7ms
2021/03/13 22:52:56 ✓ [2.3 Base Role (centos 7)] => role installs 'iproute' package (1), 10ms
2021/03/13 22:52:56 ✗ [2.3 Base Role (centos 7)] -> role installs 'python-pip' package
2021/03/13 22:52:56 Result: exit status 1
2021/03/13 22:52:56 Output:
2021-03-13 22:52:51,977 p=29633 u=root n=ansible | TASK [base : Install python-pip name=python3-pip] ******************************
2021/03/13 22:52:56 ✓ [2.3 Base Role (centos 7)] => role creates ansible facts folder (1), 194ms
2021/03/13 22:52:57 -----------------------------------------------------------------------------------
2021/03/13 22:52:57 Tests Summary:
2021/03/13 22:52:57 10 (of 11) tests passed, 1 tests failed; rated as 94.74%
2021/03/13 22:52:57
2021/03/13 22:52:57 Time Spent: 1m1.248s
2021/03/13 22:52:57 -----------------------------------------------------------------------------------
name: raman_rohau, master/ad44df5 @ 2021-03-11 08:50:58 +0000
2021/03/13 22:52:57 config: tests/user.yml
2021/03/13 22:52:57 verbosity: 2
2021/03/13 22:52:57 -----------------------------------------------------------------------------------
2021/03/13 22:52:57 Running '2.3 User Role (CentOS 7)', 1..17 tests
2021/03/13 22:52:57 -----------------------------------------------------------------------------------
2021/03/13 22:53:05 ✓ [2.3 User Role (CentOS 7)] => Role Linter (1), 5.417s
2021/03/13 22:53:06 ✓ [2.3 User Role (CentOS 7)] => playbook syntax check (1), 1.28s
2021/03/13 22:53:44 ✓ [2.3 User Role (CentOS 7)] => apply role (5), 36.683s
2021/03/13 22:53:50 ✗ [2.3 User Role (CentOS 7)] -> idempotence check (apply role twice)
2021/03/13 22:53:50 Result: exit status 2
2021/03/13 22:53:50 Output:
Using /tmp/students-2/raman_rohau/day2/2.3/ansible.cfg as config file
PLAY [all] *********************************************************************
TASK [user : Create group name={{ user_group }}, gid={{ user_gid }}] ***********
[WARNING]: Unhandled error in Python interpreter discovery for host centos7:
error occurred on host c5e949c1e56f: EOF on stream; last 100 lines received:
>>> /etc/sudoers.d/debug2: syntax error near line 1 <<< sudo: parse error in
/etc/sudoers.d/debug2 near line 1 sudo: no valid sudoers sources found,
quitting sudo: unable to initialize policy plugin
fatal: [centos7]: FAILED! => {"msg": "error occurred on host c5e949c1e56f: EOF on stream; last 100 lines received:\n>>> /etc/sudoers.d/debug2: syntax error near line 1 <<<\nsudo: parse error in /etc/sudoers.d/debug2 near line 1\nsudo: no valid sudoers sources found, quitting\nsudo: unable to initialize policy plugin"}
PLAY RECAP *********************************************************************
centos7 : ok=0 changed=0 unreachable=0 failed=1  skipped=0 rescued=0 ignored=0
2021/03/13 22:53:51 ✓ [2.3 User Role (CentOS 7)] => use "user_name" varaible (1), 618ms
2021/03/13 22:53:52 ✓ [2.3 User Role (CentOS 7)] => use "user_name", "user_group" variables (1), 797ms
2021/03/13 22:53:52 ✓ [2.3 User Role (CentOS 7)] => use "user_name", "user_id", "user_group" variables (1), 505ms
2021/03/13 22:53:53 ✓ [2.3 User Role (CentOS 7)] => use "user_name", "user_id", "user_group", "user_gid" variables (1), 670ms
2021/03/13 22:53:54 ✓ [2.3 User Role (CentOS 7)] => use "user_home" variable (1), 640ms
2021/03/13 22:53:54 ✓ [2.3 User Role (CentOS 7)] => set correct home permissions (1), 489ms
2021/03/13 22:53:55 ✓ [2.3 User Role (CentOS 7)] => user owns its home directory (1), 471ms
2021/03/13 22:53:55 ✓ [2.3 User Role (CentOS 7)] => use "user_name" from play vars (1), 441ms
2021/03/13 22:53:56 ✓ [2.3 User Role (CentOS 7)] => doesn't create home dir if required (1), 1.379s
2021/03/13 22:53:57 ✗ [2.3 User Role (CentOS 7)] -> use "user_shell" variable
2021/03/13 22:53:57 Result: exit status 1
2021/03/13 22:53:57 Output:
2021/03/13 22:53:57 ✗ [2.3 User Role (CentOS 7)] -> setting custom sudo priviliges
2021/03/13 22:53:57 Result: exit status 1
2021/03/13 22:53:57 Output:
>>> /etc/sudoers.d/debug2: syntax error near line 1 <<<
sudo: parse error in /etc/sudoers.d/debug2 near line 1
sudo: no valid sudoers sources found, quitting
sudo: unable to initialize policy plugin
2021/03/13 22:53:57 ✓ [2.3 User Role (CentOS 7)] => doesn't create sudo priviliges for all users (1), 271ms
2021/03/13 22:53:57 ✗ [2.3 User Role (CentOS 7)] -> setting custom sudo priviliges - checking validation parameter
2021/03/13 22:53:57 Result: exit status 1
2021/03/13 22:53:57 Output:
2021/03/13 22:53:59 -----------------------------------------------------------------------------------
2021/03/13 22:53:59 Tests Summary:
2021/03/13 22:53:59 13 (of 17) tests passed, 4 tests failed; rated as 68.00%
2021/03/13 22:53:59
2021/03/13 22:53:59 Time Spent: 1m2.057s
2021/03/13 22:53:59 -----------------------------------------------------------------------------------
name: raman_rohau, master/ad44df5 @ 2021-03-11 08:50:58 +0000
2021/03/13 22:53:59 config: tests/webapp-server.yml
2021/03/13 22:53:59 verbosity: 2
2021/03/13 22:53:59 -----------------------------------------------------------------------------------
2021/03/13 22:53:59 Running '2.3 WebApp-Server Role (centos 7)', 1..17 tests
2021/03/13 22:53:59 -----------------------------------------------------------------------------------
2021/03/13 22:54:07 ✓ [2.3 WebApp-Server Role (centos 7)] => role linter (1), 5.369s
2021/03/13 22:54:08 ✓ [2.3 WebApp-Server Role (centos 7)] => playbook syntax check (1), 823ms
2021/03/13 22:54:45 ✗ [2.3 WebApp-Server Role (centos 7)] -> apply role
2021/03/13 22:54:45 Result: exit status 2
2021/03/13 22:54:45 Output:
2021/03/13 22:54:55 ✗ [2.3 WebApp-Server Role (centos 7)] -> idempotence check (apply the role twice)
2021/03/13 22:54:55 Result: exit status 1
2021/03/13 22:54:55 Output:
(run, /tmp/students-2/raman_rohau/day2/2.3) => ansible-playbook testing-role-webapp-server.yml -i default, -v -e ansible_host=centos7
rc: 2
output: |
Using /tmp/students-2/raman_rohau/day2/2.3/ansible.cfg as config file
PLAY [all] *********************************************************************
TASK [base : Ensure that ansible facts folder exists] **************************
ok: [default] => {"ansible_facts": {"discovered_interpreter_python": "/usr/bin/python"}, "changed": false, "gid": 0, "group": "root", "mode": "0755", "owner": "root", "path": "/etc/ansible/facts.d", "size": 4096, "state": "directory", "uid": 0}
TASK [base : Facts gathering] **************************************************
ok: [default]
TASK [base : Install Epel-release repo] ****************************************
ok: [default] => {"ansible_facts": {}, "changed": false, "msg": "", "rc": 0, "results": ["epel-release-7-11.noarch providing epel-release is already installed"]}
TASK [base : Install python-pip] ***********************************************
ok: [default] => {"ansible_facts": {}, "changed": false, "msg": "", "rc": 0, "results": ["python3-pip-9.0.3-8.el7.noarch providing python3-pip is already installed"]}
TASK [base : Install curl] *****************************************************
ok: [default] => {"ansible_facts": {}, "changed": false, "msg": "", "rc": 0, "results": ["curl-7.29.0-51.el7.x86_64 providing curl is already installed"]}
TASK [base : Install wget] *****************************************************
ok: [default] => {"ansible_facts": {}, "changed": false, "msg": "", "rc": 0, "results": ["wget-1.14-18.el7_6.1.x86_64 providing wget is already installed"]}
TASK [base : Install sudo] *****************************************************
ok: [default] => {"ansible_facts": {}, "changed": false, "msg": "", "rc": 0, "results": ["sudo-1.8.23-3.el7.x86_64 providing sudo is already installed"]}
TASK [base : Install iproute] **************************************************
ok: [default] => {"ansible_facts": {}, "changed": false, "msg": "", "rc": 0, "results": ["iproute-4.11.0-14.el7.x86_64 providing iproute is already installed"]}
TASK [user : Create group] *****************************************************
fatal: [default]: FAILED! => {"msg": "The conditional check 'user_name != 'root'' failed. The error was: error while evaluating conditional (user_name != 'root'): {{ webapp_server_user }}: 'webapp_server_user' is undefined\n\nThe error appears to be in '/tmp/students-2/raman_rohau/day2/2.3/roles/user/tasks/main.yml': line 3, column 5, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n- block:\n - name: Create group\n ^ here\n"}
PLAY RECAP *********************************************************************
default : ok=8  changed=0 unreachable=0 failed=1  skipped=0 rescued=0 ignored=0
CMD Failed: ansible-playbook testing-role-webapp-server.yml -i default, -v -e ansible_host=centos7
2021/03/13 22:54:55 ✓ [2.3 WebApp-Server Role (centos 7)] => role depends on 'user' role (1), 7ms
2021/03/13 22:54:55 ✓ [2.3 WebApp-Server Role (centos 7)] => passing variables to 'user' role: 'webapp_server_user' (1), 7ms
2021/03/13 22:54:55 ✓ [2.3 WebApp-Server Role (centos 7)] => passing variables to 'user' role: 'webapp_server_group' (1), 7ms
2021/03/13 22:54:55 ✗ [2.3 WebApp-Server Role (centos 7)] -> service responds 200
2021/03/13 22:54:55 Result: exit status 7
2021/03/13 22:54:55 Output:
* About to connect() to localhost port 8080 (#0)
* Trying 127.0.0.1...
* Connection refused
* Trying ::1...
* Failed to connect to ::1: Cannot assign requested address
* Failed connect to localhost:8080; Cannot assign requested address
* Closing connection 0
2021/03/13 22:54:55 ✗ [2.3 WebApp-Server Role (centos 7)] -> service is enabled
2021/03/13 22:54:55 Result: exit status 1
2021/03/13 22:54:55 Output:
Failed to get unit file state for webapp-server.service: No such file or directory
2021/03/13 22:54:55 ✗ [2.3 WebApp-Server Role (centos 7)] -> service runs under proper user/group
2021/03/13 22:54:55 Result: exit status 1
2021/03/13 22:54:55 Output:
2021/03/13 22:54:56 ✗ [2.3 WebApp-Server Role (centos 7)] -> application user has no password set
2021/03/13 22:54:56 Result: exit status 1
2021/03/13 22:54:56 Output:
2021/03/13 22:55:05 ✗ [2.3 WebApp-Server Role (centos 7)] -> stress-test: updating server application
2021/03/13 22:55:05 Result: exit status 2
2021/03/13 22:55:05 Output:
Using /tmp/students-2/raman_rohau/day2/2.3/ansible.cfg as config file
PLAY [all] *********************************************************************
TASK [base : Ensure that ansible facts folder exists] **************************
ok: [default] => {"ansible_facts": {"discovered_interpreter_python": "/usr/bin/python"}, "changed": false, "gid": 0, "group": "root", "mode": "0755", "owner": "root", "path": "/etc/ansible/facts.d", "size": 4096, "state": "directory", "uid": 0}
TASK [base : Facts gathering] **************************************************
ok: [default]
TASK [base : Install Epel-release repo] ****************************************
ok: [default] => {"ansible_facts": {}, "changed": false, "msg": "", "rc": 0, "results": ["epel-release-7-11.noarch providing epel-release is already installed"]}
TASK [base : Install python-pip] ***********************************************
ok: [default] => {"ansible_facts": {}, "changed": false, "msg": "", "rc": 0, "results": ["python3-pip-9.0.3-8.el7.noarch providing python3-pip is already installed"]}
TASK [base : Install curl] *****************************************************
ok: [default] => {"ansible_facts": {}, "changed": false, "msg": "", "rc": 0, "results": ["curl-7.29.0-51.el7.x86_64 providing curl is already installed"]}
TASK [base : Install wget] *****************************************************
ok: [default] => {"ansible_facts": {}, "changed": false, "msg": "", "rc": 0, "results": ["wget-1.14-18.el7_6.1.x86_64 providing wget is already installed"]}
TASK [base : Install sudo] *****************************************************
ok: [default] => {"ansible_facts": {}, "changed": false, "msg": "", "rc": 0, "results": ["sudo-1.8.23-3.el7.x86_64 providing sudo is already installed"]}
TASK [base : Install iproute] **************************************************
ok: [default] => {"ansible_facts": {}, "changed": false, "msg": "", "rc": 0, "results": ["iproute-4.11.0-14.el7.x86_64 providing iproute is already installed"]}
TASK [user : Create group] *****************************************************
fatal: [default]: FAILED! => {"msg": "The conditional check 'user_name != 'root'' failed. The error was: error while evaluating conditional (user_name != 'root'): {{ webapp_server_user }}: 'webapp_server_user' is undefined\n\nThe error appears to be in '/tmp/students-2/raman_rohau/day2/2.3/roles/user/tasks/main.yml': line 3, column 5, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n- block:\n - name: Create group\n ^ here\n"}
PLAY RECAP *********************************************************************
default : ok=8  changed=0 unreachable=0 failed=1  skipped=0 rescued=0 ignored=0
2021/03/13 22:55:41 ✗ [2.3 WebApp-Server Role (centos 7)] -> stress-test: changing application port
2021/03/13 22:55:41 Result: exit status 2
2021/03/13 22:55:41 Output:
centos7
dda70f8f64cebec32d6386103b16559674fdb5ac4f69b156e494e71642e19504
Using /tmp/students-2/raman_rohau/day2/2.3/ansible.cfg as config file
PLAY [all] *********************************************************************
TASK [base : Ensure that ansible facts folder exists] **************************
changed: [default] => {"ansible_facts": {"discovered_interpreter_python": "/usr/bin/python"}, "changed": true, "gid": 0, "group": "root", "mode": "0755", "owner": "root", "path": "/etc/ansible/facts.d", "size": 4096, "state": "directory", "uid": 0}
TASK [base : Facts gathering] **************************************************
ok: [default]
TASK [base : Install Epel-release repo] ****************************************
ok: [default] => {"ansible_facts": {}, "changed": false, "msg": "", "rc": 0, "results": ["epel-release-7-11.noarch providing epel-release is already installed"]}
TASK [base : Install python-pip] ***********************************************
changed: [default] => {"ansible_facts": {}, "changed": true, "changes": {"installed": ["python3-pip"]}, "msg": "", "rc": 0, "results": ["Loaded plugins: fastestmirror, ovl\nDetermining fastest mirrors\n * base: mirror.datacenter.by\n * epel: mirrors.colocall.net\n * extras: centos1.hti.pl\n * updates: centos.hitme.net.pl\nResolving Dependencies\n--> Running transaction check\n---> Package python3-pip.noarch 0:9.0.3-8.el7 will be installed\n--> Processing Dependency: python(abi) = 3.6 for package: python3-pip-9.0.3-8.el7.noarch\n--> Processing Dependency: python3-setuptools for package: python3-pip-9.0.3-8.el7.noarch\n--> Processing Dependency: /usr/bin/python3 for package: python3-pip-9.0.3-8.el7.noarch\n--> Running transaction check\n---> Package python3.x86_64 0:3.6.8-18.el7 will be installed\n--> Processing Dependency: python3-libs(x86-64) = 3.6.8-18.el7 for package: python3-3.6.8-18.el7.x86_64\n--> Processing Dependency: libpython3.6m.so.1.0()(64bit) for package: python3-3.6.8-18.el7.x86_64\n---> Package python3-setuptools.noarch 0:39.2.0-10.el7 will be installed\n--> Running transaction check\n---> Package python3-libs.x86_64 0:3.6.8-18.el7 will be installed\n--> Processing Dependency: libtirpc.so.1()(64bit) for package: python3-libs-3.6.8-18.el7.x86_64\n--> Running transaction check\n---> Package libtirpc.x86_64 0:0.2.4-0.16.el7 will be installed\n--> Finished Dependency Resolution\n\nDependencies Resolved\n\n================================================================================\n Package Arch Version Repository Size\n================================================================================\nInstalling:\n python3-pip noarch 9.0.3-8.el7 base 1.6 M\nInstalling for dependencies:\n libtirpc x86_64 0.2.4-0.16.el7 base 89 k\n python3 x86_64 3.6.8-18.el7 updates 70 k\n python3-libs x86_64 3.6.8-18.el7 updates 6.9 M\n python3-setuptools noarch 39.2.0-10.el7 base 629 k\n\nTransaction Summary\n================================================================================\nInstall 1 Package (+4 Dependent packages)\n\nTotal download size: 9.3 M\nInstalled size: 48 M\nDownloading packages:\n--------------------------------------------------------------------------------\nTotal 19 MB/s | 9.3 MB 00:00 \nRunning transaction check\nRunning transaction test\nTransaction test succeeded\nRunning transaction\n Installing : libtirpc-0.2.4-0.16.el7.x86_64 1/5 \n Installing : python3-setuptools-39.2.0-10.el7.noarch 2/5 \n Installing : python3-pip-9.0.3-8.el7.noarch 3/5 \n Installing : python3-3.6.8-18.el7.x86_64 4/5 \n Installing : python3-libs-3.6.8-18.el7.x86_64 5/5 \n Verifying : libtirpc-0.2.4-0.16.el7.x86_64 1/5 \n Verifying : python3-libs-3.6.8-18.el7.x86_64 2/5 \n Verifying : python3-setuptools-39.2.0-10.el7.noarch 3/5 \n Verifying : python3-3.6.8-18.el7.x86_64 4/5 \n Verifying : python3-pip-9.0.3-8.el7.noarch 5/5 \n\nInstalled:\n python3-pip.noarch 0:9.0.3-8.el7 \n\nDependency Installed:\n libtirpc.x86_64 0:0.2.4-0.16.el7 python3.x86_64 0:3.6.8-18.el7 \n python3-libs.x86_64 0:3.6.8-18.el7 python3-setuptools.noarch 0:39.2.0-10.el7 \n\nComplete!\n"]}
TASK [base : Install curl] *****************************************************
ok: [default] => {"ansible_facts": {}, "changed": false, "msg": "", "rc": 0, "results": ["curl-7.29.0-51.el7.x86_64 providing curl is already installed"]}
TASK [base : Install wget] *****************************************************
changed: [default] => {"ansible_facts": {}, "changed": true, "changes": {"installed": ["wget"]}, "msg": "", "rc": 0, "results": ["Loaded plugins: fastestmirror, ovl\nLoading mirror speeds from cached hostfile\n * base: mirror.datacenter.by\n * epel: mirrors.colocall.net\n * extras: centos1.hti.pl\n * updates: centos.hitme.net.pl\nResolving Dependencies\n--> Running transaction check\n---> Package wget.x86_64 0:1.14-18.el7_6.1 will be installed\n--> Finished Dependency Resolution\n\nDependencies Resolved\n\n================================================================================\n Package Arch Version Repository Size\n================================================================================\nInstalling:\n wget x86_64 1.14-18.el7_6.1 base 547 k\n\nTransaction Summary\n================================================================================\nInstall 1 Package\n\nTotal download size: 547 k\nInstalled size: 2.0 M\nDownloading packages:\nRunning transaction check\nRunning transaction test\nTransaction test succeeded\nRunning transaction\n Installing : wget-1.14-18.el7_6.1.x86_64 1/1 \ninstall-info: No such file or directory for /usr/share/info/wget.info.gz\n Verifying : wget-1.14-18.el7_6.1.x86_64 1/1 \n\nInstalled:\n wget.x86_64 0:1.14-18.el7_6.1 \n\nComplete!\n"]}
TASK [base : Install sudo] *****************************************************
ok: [default] => {"ansible_facts": {}, "changed": false, "msg": "", "rc": 0, "results": ["sudo-1.8.23-3.el7.x86_64 providing sudo is already installed"]}
TASK [base : Install iproute] **************************************************
ok: [default] => {"ansible_facts": {}, "changed": false, "msg": "", "rc": 0, "results": ["iproute-4.11.0-14.el7.x86_64 providing iproute is already installed"]}
TASK [user : Create group] *****************************************************
fatal: [default]: FAILED! => {"msg": "The conditional check 'user_name != 'root'' failed. The error was: error while evaluating conditional (user_name != 'root'): {{ webapp_server_user }}: 'webapp_server_user' is undefined\n\nThe error appears to be in '/tmp/students-2/raman_rohau/day2/2.3/roles/user/tasks/main.yml': line 3, column 5, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n- block:\n - name: Create group\n ^ here\n"}
PLAY RECAP *********************************************************************
default : ok=8  changed=3  unreachable=0 failed=1  skipped=0 rescued=0 ignored=0
2021/03/13 22:56:24 ✗ [2.3 WebApp-Server Role (centos 7)] -> stress-test: changing student name
2021/03/13 22:56:24 Result: exit status 2
2021/03/13 22:56:24 Output:
centos7
cf8823350f98dacdc1e610ded5f2d624ce982dea3f85e264c915a38036a90319
Using /tmp/students-2/raman_rohau/day2/2.3/ansible.cfg as config file
PLAY [all] *********************************************************************
TASK [base : Ensure that ansible facts folder exists] **************************
changed: [default] => {"ansible_facts": {"discovered_interpreter_python": "/usr/bin/python"}, "changed": true, "gid": 0, "group": "root", "mode": "0755", "owner": "root", "path": "/etc/ansible/facts.d", "size": 4096, "state": "directory", "uid": 0}
TASK [base : Facts gathering] **************************************************
ok: [default]
TASK [base : Install Epel-release repo] ****************************************
ok: [default] => {"ansible_facts": {}, "changed": false, "msg": "", "rc": 0, "results": ["epel-release-7-11.noarch providing epel-release is already installed"]}
TASK [base : Install python-pip] ***********************************************
changed: [default] => {"ansible_facts": {}, "changed": true, "changes": {"installed": ["python3-pip"]}, "msg": "", "rc": 0, "results": ["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 python3-pip.noarch 0:9.0.3-8.el7 will be installed\n--> Processing Dependency: python(abi) = 3.6 for package: python3-pip-9.0.3-8.el7.noarch\n--> Processing Dependency: python3-setuptools for package: python3-pip-9.0.3-8.el7.noarch\n--> Processing Dependency: /usr/bin/python3 for package: python3-pip-9.0.3-8.el7.noarch\n--> Running transaction check\n---> Package python3.x86_64 0:3.6.8-18.el7 will be installed\n--> Processing Dependency: python3-libs(x86-64) = 3.6.8-18.el7 for package: python3-3.6.8-18.el7.x86_64\n--> Processing Dependency: libpython3.6m.so.1.0()(64bit) for package: python3-3.6.8-18.el7.x86_64\n---> Package python3-setuptools.noarch 0:39.2.0-10.el7 will be installed\n--> Running transaction check\n---> Package python3-libs.x86_64 0:3.6.8-18.el7 will be installed\n--> Processing Dependency: libtirpc.so.1()(64bit) for package: python3-libs-3.6.8-18.el7.x86_64\n--> Running transaction check\n---> Package libtirpc.x86_64 0:0.2.4-0.16.el7 will be installed\n--> Finished Dependency Resolution\n\nDependencies Resolved\n\n================================================================================\n Package Arch Version Repository Size\n================================================================================\nInstalling:\n python3-pip noarch 9.0.3-8.el7 base 1.6 M\nInstalling for dependencies:\n libtirpc x86_64 0.2.4-0.16.el7 base 89 k\n python3 x86_64 3.6.8-18.el7 updates 70 k\n python3-libs x86_64 3.6.8-18.el7 updates 6.9 M\n python3-setuptools noarch 39.2.0-10.el7 base 629 k\n\nTransaction Summary\n================================================================================\nInstall 1 Package (+4 Dependent packages)\n\nTotal download size: 9.3 M\nInstalled size: 48 M\nDownloading packages:\n--------------------------------------------------------------------------------\nTotal 13 MB/s | 9.3 MB 00:00 \nRunning transaction check\nRunning transaction test\nTransaction test succeeded\nRunning transaction\n Installing : libtirpc-0.2.4-0.16.el7.x86_64 1/5 \n Installing : python3-setuptools-39.2.0-10.el7.noarch 2/5 \n Installing : python3-pip-9.0.3-8.el7.noarch 3/5 \n Installing : python3-3.6.8-18.el7.x86_64 4/5 \n Installing : python3-libs-3.6.8-18.el7.x86_64 5/5 \n Verifying : libtirpc-0.2.4-0.16.el7.x86_64 1/5 \n Verifying : python3-libs-3.6.8-18.el7.x86_64 2/5 \n Verifying : python3-setuptools-39.2.0-10.el7.noarch 3/5 \n Verifying : python3-3.6.8-18.el7.x86_64 4/5 \n Verifying : python3-pip-9.0.3-8.el7.noarch 5/5 \n\nInstalled:\n python3-pip.noarch 0:9.0.3-8.el7 \n\nDependency Installed:\n libtirpc.x86_64 0:0.2.4-0.16.el7 python3.x86_64 0:3.6.8-18.el7 \n python3-libs.x86_64 0:3.6.8-18.el7 python3-setuptools.noarch 0:39.2.0-10.el7 \n\nComplete!\n"]}
TASK [base : Install curl] *****************************************************
ok: [default] => {"ansible_facts": {}, "changed": false, "msg": "", "rc": 0, "results": ["curl-7.29.0-51.el7.x86_64 providing curl is already installed"]}
TASK [base : Install wget] *****************************************************
changed: [default] => {"ansible_facts": {}, "changed": true, "changes": {"installed": ["wget"]}, "msg": "", "rc": 0, "results": ["Loaded plugins: fastestmirror, ovl\nLoading mirror speeds from cached hostfile\n * base: ftp.byfly.by\n * epel: mirror.datacenter.by\n * extras: ftp.byfly.by\n * updates: ftp.byfly.by\nResolving Dependencies\n--> Running transaction check\n---> Package wget.x86_64 0:1.14-18.el7_6.1 will be installed\n--> Finished Dependency Resolution\n\nDependencies Resolved\n\n================================================================================\n Package Arch Version Repository Size\n================================================================================\nInstalling:\n wget x86_64 1.14-18.el7_6.1 base 547 k\n\nTransaction Summary\n================================================================================\nInstall 1 Package\n\nTotal download size: 547 k\nInstalled size: 2.0 M\nDownloading packages:\nRunning transaction check\nRunning transaction test\nTransaction test succeeded\nRunning transaction\n Installing : wget-1.14-18.el7_6.1.x86_64 1/1 \ninstall-info: No such file or directory for /usr/share/info/wget.info.gz\n Verifying : wget-1.14-18.el7_6.1.x86_64 1/1 \n\nInstalled:\n wget.x86_64 0:1.14-18.el7_6.1 \n\nComplete!\n"]}
TASK [base : Install sudo] *****************************************************
ok: [default] => {"ansible_facts": {}, "changed": false, "msg": "", "rc": 0, "results": ["sudo-1.8.23-3.el7.x86_64 providing sudo is already installed"]}
TASK [base : Install iproute] **************************************************
ok: [default] => {"ansible_facts": {}, "changed": false, "msg": "", "rc": 0, "results": ["iproute-4.11.0-14.el7.x86_64 providing iproute is already installed"]}
TASK [user : Create group] *****************************************************
fatal: [default]: FAILED! => {"msg": "The conditional check 'user_name != 'root'' failed. The error was: error while evaluating conditional (user_name != 'root'): {{ webapp_server_user }}: 'webapp_server_user' is undefined\n\nThe error appears to be in '/tmp/students-2/raman_rohau/day2/2.3/roles/user/tasks/main.yml': line 3, column 5, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n- block:\n - name: Create group\n ^ here\n"}
PLAY RECAP *********************************************************************
default : ok=8  changed=3  unreachable=0 failed=1  skipped=0 rescued=0 ignored=0
2021/03/13 22:56:58 ✗ [2.3 WebApp-Server Role (centos 7)] -> stress-test: changing application home dir
2021/03/13 22:56:58 Result: exit status 2
2021/03/13 22:56:58 Output:
centos7
6f60aa7e8019d9627168750ec0ff506cba076282920c8473c289b1721683e131
Using /tmp/students-2/raman_rohau/day2/2.3/ansible.cfg as config file
PLAY [all] *********************************************************************
TASK [base : Ensure that ansible facts folder exists] **************************
changed: [default] => {"ansible_facts": {"discovered_interpreter_python": "/usr/bin/python"}, "changed": true, "gid": 0, "group": "root", "mode": "0755", "owner": "root", "path": "/etc/ansible/facts.d", "size": 4096, "state": "directory", "uid": 0}
TASK [base : Facts gathering] **************************************************
ok: [default]
TASK [base : Install Epel-release repo] ****************************************
ok: [default] => {"ansible_facts": {}, "changed": false, "msg": "", "rc": 0, "results": ["epel-release-7-11.noarch providing epel-release is already installed"]}
TASK [base : Install python-pip] ***********************************************
changed: [default] => {"ansible_facts": {}, "changed": true, "changes": {"installed": ["python3-pip"]}, "msg": "", "rc": 0, "results": ["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 python3-pip.noarch 0:9.0.3-8.el7 will be installed\n--> Processing Dependency: python(abi) = 3.6 for package: python3-pip-9.0.3-8.el7.noarch\n--> Processing Dependency: python3-setuptools for package: python3-pip-9.0.3-8.el7.noarch\n--> Processing Dependency: /usr/bin/python3 for package: python3-pip-9.0.3-8.el7.noarch\n--> Running transaction check\n---> Package python3.x86_64 0:3.6.8-18.el7 will be installed\n--> Processing Dependency: python3-libs(x86-64) = 3.6.8-18.el7 for package: python3-3.6.8-18.el7.x86_64\n--> Processing Dependency: libpython3.6m.so.1.0()(64bit) for package: python3-3.6.8-18.el7.x86_64\n---> Package python3-setuptools.noarch 0:39.2.0-10.el7 will be installed\n--> Running transaction check\n---> Package python3-libs.x86_64 0:3.6.8-18.el7 will be installed\n--> Processing Dependency: libtirpc.so.1()(64bit) for package: python3-libs-3.6.8-18.el7.x86_64\n--> Running transaction check\n---> Package libtirpc.x86_64 0:0.2.4-0.16.el7 will be installed\n--> Finished Dependency Resolution\n\nDependencies Resolved\n\n================================================================================\n Package Arch Version Repository Size\n================================================================================\nInstalling:\n python3-pip noarch 9.0.3-8.el7 base 1.6 M\nInstalling for dependencies:\n libtirpc x86_64 0.2.4-0.16.el7 base 89 k\n python3 x86_64 3.6.8-18.el7 updates 70 k\n python3-libs x86_64 3.6.8-18.el7 updates 6.9 M\n python3-setuptools noarch 39.2.0-10.el7 base 629 k\n\nTransaction Summary\n================================================================================\nInstall 1 Package (+4 Dependent packages)\n\nTotal download size: 9.3 M\nInstalled size: 48 M\nDownloading packages:\n--------------------------------------------------------------------------------\nTotal 18 MB/s | 9.3 MB 00:00 \nRunning transaction check\nRunning transaction test\nTransaction test succeeded\nRunning transaction\n Installing : libtirpc-0.2.4-0.16.el7.x86_64 1/5 \n Installing : python3-setuptools-39.2.0-10.el7.noarch 2/5 \n Installing : python3-pip-9.0.3-8.el7.noarch 3/5 \n Installing : python3-3.6.8-18.el7.x86_64 4/5 \n Installing : python3-libs-3.6.8-18.el7.x86_64 5/5 \n Verifying : libtirpc-0.2.4-0.16.el7.x86_64 1/5 \n Verifying : python3-libs-3.6.8-18.el7.x86_64 2/5 \n Verifying : python3-setuptools-39.2.0-10.el7.noarch 3/5 \n Verifying : python3-3.6.8-18.el7.x86_64 4/5 \n Verifying : python3-pip-9.0.3-8.el7.noarch 5/5 \n\nInstalled:\n python3-pip.noarch 0:9.0.3-8.el7 \n\nDependency Installed:\n libtirpc.x86_64 0:0.2.4-0.16.el7 python3.x86_64 0:3.6.8-18.el7 \n python3-libs.x86_64 0:3.6.8-18.el7 python3-setuptools.noarch 0:39.2.0-10.el7 \n\nComplete!\n"]}
TASK [base : Install curl] *****************************************************
ok: [default] => {"ansible_facts": {}, "changed": false, "msg": "", "rc": 0, "results": ["curl-7.29.0-51.el7.x86_64 providing curl is already installed"]}
TASK [base : Install wget] *****************************************************
changed: [default] => {"ansible_facts": {}, "changed": true, "changes": {"installed": ["wget"]}, "msg": "", "rc": 0, "results": ["Loaded plugins: fastestmirror, ovl\nLoading mirror speeds from cached hostfile\n * base: ftp.byfly.by\n * epel: mirror.datacenter.by\n * extras: ftp.byfly.by\n * updates: ftp.byfly.by\nResolving Dependencies\n--> Running transaction check\n---> Package wget.x86_64 0:1.14-18.el7_6.1 will be installed\n--> Finished Dependency Resolution\n\nDependencies Resolved\n\n================================================================================\n Package Arch Version Repository Size\n================================================================================\nInstalling:\n wget x86_64 1.14-18.el7_6.1 base 547 k\n\nTransaction Summary\n================================================================================\nInstall 1 Package\n\nTotal download size: 547 k\nInstalled size: 2.0 M\nDownloading packages:\nRunning transaction check\nRunning transaction test\nTransaction test succeeded\nRunning transaction\n Installing : wget-1.14-18.el7_6.1.x86_64 1/1 \ninstall-info: No such file or directory for /usr/share/info/wget.info.gz\n Verifying : wget-1.14-18.el7_6.1.x86_64 1/1 \n\nInstalled:\n wget.x86_64 0:1.14-18.el7_6.1 \n\nComplete!\n"]}
TASK [base : Install sudo] *****************************************************
ok: [default] => {"ansible_facts": {}, "changed": false, "msg": "", "rc": 0, "results": ["sudo-1.8.23-3.el7.x86_64 providing sudo is already installed"]}
TASK [base : Install iproute] **************************************************
ok: [default] => {"ansible_facts": {}, "changed": false, "msg": "", "rc": 0, "results": ["iproute-4.11.0-14.el7.x86_64 providing iproute is already installed"]}
TASK [user : Create group] *****************************************************
fatal: [default]: FAILED! => {"msg": "The conditional check 'user_name != 'root'' failed. The error was: error while evaluating conditional (user_name != 'root'): {{ webapp_server_user }}: 'webapp_server_user' is undefined\n\nThe error appears to be in '/tmp/students-2/raman_rohau/day2/2.3/roles/user/tasks/main.yml': line 3, column 5, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n- block:\n - name: Create group\n ^ here\n"}
PLAY RECAP *********************************************************************
default : ok=8  changed=3  unreachable=0 failed=1  skipped=0 rescued=0 ignored=0
2021/03/13 22:57:35 ✗ [2.3 WebApp-Server Role (centos 7)] -> rollout (Not ROOT)
2021/03/13 22:57:35 Result: exit status 2
2021/03/13 22:57:35 Output:
centos7
a0680593f008b377815ab6605bfaa30509bf2b1c0be7e74d993c4e5ca8858ca0
Using /tmp/students-2/raman_rohau/day2/2.3/ansible.cfg as config file
PLAY [all] *********************************************************************
TASK [base : Ensure that ansible facts folder exists] **************************
changed: [default] => {"ansible_facts": {"discovered_interpreter_python": "/usr/bin/python"}, "changed": true, "gid": 0, "group": "root", "mode": "0755", "owner": "root", "path": "/etc/ansible/facts.d", "size": 4096, "state": "directory", "uid": 0}
TASK [base : Facts gathering] **************************************************
ok: [default]
TASK [base : Install Epel-release repo] ****************************************
ok: [default] => {"ansible_facts": {}, "changed": false, "msg": "", "rc": 0, "results": ["epel-release-7-11.noarch providing epel-release is already installed"]}
TASK [base : Install python-pip] ***********************************************
changed: [default] => {"ansible_facts": {}, "changed": true, "changes": {"installed": ["python3-pip"]}, "msg": "", "rc": 0, "results": ["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 python3-pip.noarch 0:9.0.3-8.el7 will be installed\n--> Processing Dependency: python(abi) = 3.6 for package: python3-pip-9.0.3-8.el7.noarch\n--> Processing Dependency: python3-setuptools for package: python3-pip-9.0.3-8.el7.noarch\n--> Processing Dependency: /usr/bin/python3 for package: python3-pip-9.0.3-8.el7.noarch\n--> Running transaction check\n---> Package python3.x86_64 0:3.6.8-18.el7 will be installed\n--> Processing Dependency: python3-libs(x86-64) = 3.6.8-18.el7 for package: python3-3.6.8-18.el7.x86_64\n--> Processing Dependency: libpython3.6m.so.1.0()(64bit) for package: python3-3.6.8-18.el7.x86_64\n---> Package python3-setuptools.noarch 0:39.2.0-10.el7 will be installed\n--> Running transaction check\n---> Package python3-libs.x86_64 0:3.6.8-18.el7 will be installed\n--> Processing Dependency: libtirpc.so.1()(64bit) for package: python3-libs-3.6.8-18.el7.x86_64\n--> Running transaction check\n---> Package libtirpc.x86_64 0:0.2.4-0.16.el7 will be installed\n--> Finished Dependency Resolution\n\nDependencies Resolved\n\n================================================================================\n Package Arch Version Repository Size\n================================================================================\nInstalling:\n python3-pip noarch 9.0.3-8.el7 base 1.6 M\nInstalling for dependencies:\n libtirpc x86_64 0.2.4-0.16.el7 base 89 k\n python3 x86_64 3.6.8-18.el7 updates 70 k\n python3-libs x86_64 3.6.8-18.el7 updates 6.9 M\n python3-setuptools noarch 39.2.0-10.el7 base 629 k\n\nTransaction Summary\n================================================================================\nInstall 1 Package (+4 Dependent packages)\n\nTotal download size: 9.3 M\nInstalled size: 48 M\nDownloading packages:\n--------------------------------------------------------------------------------\nTotal 18 MB/s | 9.3 MB 00:00 \nRunning transaction check\nRunning transaction test\nTransaction test succeeded\nRunning transaction\n Installing : libtirpc-0.2.4-0.16.el7.x86_64 1/5 \n Installing : python3-setuptools-39.2.0-10.el7.noarch 2/5 \n Installing : python3-pip-9.0.3-8.el7.noarch 3/5 \n Installing : python3-3.6.8-18.el7.x86_64 4/5 \n Installing : python3-libs-3.6.8-18.el7.x86_64 5/5 \n Verifying : libtirpc-0.2.4-0.16.el7.x86_64 1/5 \n Verifying : python3-libs-3.6.8-18.el7.x86_64 2/5 \n Verifying : python3-setuptools-39.2.0-10.el7.noarch 3/5 \n Verifying : python3-3.6.8-18.el7.x86_64 4/5 \n Verifying : python3-pip-9.0.3-8.el7.noarch 5/5 \n\nInstalled:\n python3-pip.noarch 0:9.0.3-8.el7 \n\nDependency Installed:\n libtirpc.x86_64 0:0.2.4-0.16.el7 python3.x86_64 0:3.6.8-18.el7 \n python3-libs.x86_64 0:3.6.8-18.el7 python3-setuptools.noarch 0:39.2.0-10.el7 \n\nComplete!\n"]}
TASK [base : Install curl] *****************************************************
ok: [default] => {"ansible_facts": {}, "changed": false, "msg": "", "rc": 0, "results": ["curl-7.29.0-51.el7.x86_64 providing curl is already installed"]}
TASK [base : Install wget] *****************************************************
changed: [default] => {"ansible_facts": {}, "changed": true, "changes": {"installed": ["wget"]}, "msg": "", "rc": 0, "results": ["Loaded plugins: fastestmirror, ovl\nLoading mirror speeds from cached hostfile\n * base: ftp.byfly.by\n * epel: mirror.datacenter.by\n * extras: ftp.byfly.by\n * updates: ftp.byfly.by\nResolving Dependencies\n--> Running transaction check\n---> Package wget.x86_64 0:1.14-18.el7_6.1 will be installed\n--> Finished Dependency Resolution\n\nDependencies Resolved\n\n================================================================================\n Package Arch Version Repository Size\n================================================================================\nInstalling:\n wget x86_64 1.14-18.el7_6.1 base 547 k\n\nTransaction Summary\n================================================================================\nInstall 1 Package\n\nTotal download size: 547 k\nInstalled size: 2.0 M\nDownloading packages:\nRunning transaction check\nRunning transaction test\nTransaction test succeeded\nRunning transaction\n Installing : wget-1.14-18.el7_6.1.x86_64 1/1 \ninstall-info: No such file or directory for /usr/share/info/wget.info.gz\n Verifying : wget-1.14-18.el7_6.1.x86_64 1/1 \n\nInstalled:\n wget.x86_64 0:1.14-18.el7_6.1 \n\nComplete!\n"]}
TASK [base : Install sudo] *****************************************************
ok: [default] => {"ansible_facts": {}, "changed": false, "msg": "", "rc": 0, "results": ["sudo-1.8.23-3.el7.x86_64 providing sudo is already installed"]}
TASK [base : Install iproute] **************************************************
ok: [default] => {"ansible_facts": {}, "changed": false, "msg": "", "rc": 0, "results": ["iproute-4.11.0-14.el7.x86_64 providing iproute is already installed"]}
TASK [user : Create group] *****************************************************
fatal: [default]: FAILED! => {"msg": "The conditional check 'user_name != 'root'' failed. The error was: error while evaluating conditional (user_name != 'root'): {{ webapp_server_user }}: 'webapp_server_user' is undefined\n\nThe error appears to be in '/tmp/students-2/raman_rohau/day2/2.3/roles/user/tasks/main.yml': line 3, column 5, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n- block:\n - name: Create group\n ^ here\n"}
PLAY RECAP *********************************************************************
default : ok=8  changed=3  unreachable=0 failed=1  skipped=0 rescued=0 ignored=0
2021/03/13 22:57:46 ✗ [2.3 WebApp-Server Role (centos 7)] -> idempotancy check (Not ROOT)
2021/03/13 22:57:46 Result: exit status 1
2021/03/13 22:57:46 Output:
(run, /tmp/students-2/raman_rohau/day2/2.3) => ansible-playbook testing-role-webapp-server.yml -i default, -e ansible_host=centos7 -v -u devops
rc: 2
output: |
Using /tmp/students-2/raman_rohau/day2/2.3/ansible.cfg as config file
PLAY [all] *********************************************************************
TASK [base : Ensure that ansible facts folder exists] **************************
ok: [default] => {"ansible_facts": {"discovered_interpreter_python": "/usr/bin/python"}, "changed": false, "gid": 0, "group": "root", "mode": "0755", "owner": "root", "path": "/etc/ansible/facts.d", "size": 4096, "state": "directory", "uid": 0}
TASK [base : Facts gathering] **************************************************
ok: [default]
TASK [base : Install Epel-release repo] ****************************************
ok: [default] => {"ansible_facts": {}, "changed": false, "msg": "", "rc": 0, "results": ["epel-release-7-11.noarch providing epel-release is already installed"]}
TASK [base : Install python-pip] ***********************************************
ok: [default] => {"ansible_facts": {}, "changed": false, "msg": "", "rc": 0, "results": ["python3-pip-9.0.3-8.el7.noarch providing python3-pip is already installed"]}
TASK [base : Install curl] *****************************************************
ok: [default] => {"ansible_facts": {}, "changed": false, "msg": "", "rc": 0, "results": ["curl-7.29.0-51.el7.x86_64 providing curl is already installed"]}
TASK [base : Install wget] *****************************************************
ok: [default] => {"ansible_facts": {}, "changed": false, "msg": "", "rc": 0, "results": ["wget-1.14-18.el7_6.1.x86_64 providing wget is already installed"]}
TASK [base : Install sudo] *****************************************************
ok: [default] => {"ansible_facts": {}, "changed": false, "msg": "", "rc": 0, "results": ["sudo-1.8.23-3.el7.x86_64 providing sudo is already installed"]}
TASK [base : Install iproute] **************************************************
ok: [default] => {"ansible_facts": {}, "changed": false, "msg": "", "rc": 0, "results": ["iproute-4.11.0-14.el7.x86_64 providing iproute is already installed"]}
TASK [user : Create group] *****************************************************
fatal: [default]: FAILED! => {"msg": "The conditional check 'user_name != 'root'' failed. The error was: error while evaluating conditional (user_name != 'root'): {{ webapp_server_user }}: 'webapp_server_user' is undefined\n\nThe error appears to be in '/tmp/students-2/raman_rohau/day2/2.3/roles/user/tasks/main.yml': line 3, column 5, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n- block:\n - name: Create group\n ^ here\n"}
PLAY RECAP *********************************************************************
default : ok=8  changed=0 unreachable=0 failed=1  skipped=0 rescued=0 ignored=0
CMD Failed:
2021/03/13 22:57:48 -----------------------------------------------------------------------------------
2021/03/13 22:57:48 Tests Summary:
2021/03/13 22:57:48 5 (of 17) tests passed, 12 tests failed; rated as 15.15%
2021/03/13 22:57:48
2021/03/13 22:57:48 Time Spent: 3m48.324s
2021/03/13 22:57:48 -----------------------------------------------------------------------------------
name: raman_rohau, master/ad44df5 @ 2021-03-11 08:50:58 +0000
2021/03/13 22:57:48 config: tests/mysqldb.yml
2021/03/13 22:57:48 verbosity: 2
2021/03/13 22:57:48 -----------------------------------------------------------------------------------
2021/03/13 22:57:48 Running '2.3 MysqlDB Role (CentOS 7)', 1..17 tests
2021/03/13 22:57:48 -----------------------------------------------------------------------------------
2021/03/13 22:57:52 ✗ [2.3 MysqlDB Role (CentOS 7)] -> 'mysql_db' role linter
2021/03/13 22:57:52 Result: exit status 2
2021/03/13 22:57:52 Output:
Added ANSIBLE_ROLES_PATH=~/.ansible/roles:/usr/share/ansible/roles:/etc/ansible/roles:roles
WARNING Listing 4 violation(s) that are fatal
command-instead-of-shell: Use shell only when shell functionality is required
roles/mysql_db/tasks/main.yml:22 Task/Handler: Initialization procedure
no-handler: Tasks that run when changed should likely be handlers
roles/mysql_db/tasks/main.yml:22 Task/Handler: Initialization procedure
risky-shell-pipe: Shells that use pipes should set the pipefail option
roles/mysql_db/tasks/main.yml:34 Task/Handler: Set root password for MySQL
command-instead-of-shell: Use shell only when shell functionality is required
roles/mysql_db_user/tasks/main.yml:2 Task/Handler: Check if MySQL is installed
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
- risky-shell-pipe # Shells that use pipes should set the pipefail option
Finished with 4 failure(s), 0 warning(s) on 10 files.
2021/03/13 22:57:55 ✗ [2.3 MysqlDB Role (CentOS 7)] -> 'mysql_db_user' role linter
2021/03/13 22:57:55 Result: exit status 2
2021/03/13 22:57:55 Output:
Added ANSIBLE_ROLES_PATH=~/.ansible/roles:/usr/share/ansible/roles:/etc/ansible/roles:roles
WARNING Listing 1 violation(s) that are fatal
command-instead-of-shell: Use shell only when shell functionality is required
roles/mysql_db_user/tasks/main.yml:2 Task/Handler: Check if MySQL is installed
You can skip specific rules or tags by adding them to your configuration file:
# .ansible-lint
warn_list: # or 'skip_list' to silence them completely
- command-instead-of-shell # Use shell only when shell functionality is required
Finished with 1 failure(s), 0 warning(s) on 2 files.
2021/03/13 22:57:55 ✗ [2.3 MysqlDB Role (CentOS 7)] -> playbook syntax check
2021/03/13 22:57:55 Result: exit status 1
2021/03/13 22:57:55 Output:
Using /tmp/students-2/raman_rohau/day2/2.3/ansible.cfg as config file
ERROR! the role 'mysqldb_user' was not found in /tmp/students-2/raman_rohau/day2/2.3/roles:/root/.ansible/roles:/usr/share/ansible/roles:/etc/ansible/roles:/tmp/students-2/raman_rohau/day2/2.3

The error appears to be in '/tmp/students-2/raman_rohau/day2/2.3/role-mysqldb.yml': line 17, column 5, but may
be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:


 - role: mysqldb_user
 ^ here
2021/03/13 22:57:57 ✗ [2.3 MysqlDB Role (CentOS 7)] -> running role-mysqldb.yml playbook
2021/03/13 22:57:57 Result: exit status 1
2021/03/13 22:57:57 Output:
Error: No such container: db
202a615d52b500ed30d5fdfd4bea5537992be44c6a4a439c8c3c90a69767045f
Using /tmp/students-2/raman_rohau/day2/2.3/ansible.cfg as config file
ERROR! the role 'mysqldb_user' was not found in /tmp/students-2/raman_rohau/day2/2.3/roles:/root/.ansible/roles:/usr/share/ansible/roles:/etc/ansible/roles:/tmp/students-2/raman_rohau/day2/2.3

The error appears to be in '/tmp/students-2/raman_rohau/day2/2.3/role-mysqldb.yml': line 17, column 5, but may
be elsewhere in the file depending on the exact syntax problem.

The offending line appears to be:


 - role: mysqldb_user
 ^ here
2021/03/13 23:01:27 ✓ [2.3 MysqlDB Role (CentOS 7)] => apply 'mysql_db' role (1), 3m29.305s
2021/03/13 23:01:41 ✓ [2.3 MysqlDB Role (CentOS 7)] => apply 'mysql_db' role again (1), 14.231s
2021/03/13 23:01:47 ✓ [2.3 MysqlDB Role (CentOS 7)] => apply 'mysql_db_user' role (1), 5.416s
2021/03/13 23:01:52 ✓ [2.3 MysqlDB Role (CentOS 7)] => apply 'mysql_db_user' role again (1), 5.507s
2021/03/13 23:01:52 ✓ [2.3 MysqlDB Role (CentOS 7)] => db service is enabled (1), 187ms
2021/03/13 23:01:53 ✓ [2.3 MysqlDB Role (CentOS 7)] => db service is active (1), 184ms
2021/03/13 23:01:53 ✓ [2.3 MysqlDB Role (CentOS 7)] => db service is running on 3306 (1), 196ms
2021/03/13 23:01:53 ✓ [2.3 MysqlDB Role (CentOS 7)] => db root password set (1), 215ms
2021/03/13 23:01:53 ✓ [2.3 MysqlDB Role (CentOS 7)] => custom db user (non-root) created (1), 170ms
2021/03/13 23:04:40 ✓ [2.3 MysqlDB Role (CentOS 7)] => apply 'mysql_db' role (Not ROOT) (1), 2m46.821s
2021/03/13 23:04:55 ✓ [2.3 MysqlDB Role (CentOS 7)] => apply 'mysql_db' role (Not ROOT) again (1), 14.632s
2021/03/13 23:05:00 ✓ [2.3 MysqlDB Role (CentOS 7)] => apply 'mysql_db_user' role (Not ROOT) (1), 5.696s
2021/03/13 23:05:06 ✓ [2.3 MysqlDB Role (CentOS 7)] => apply 'mysql_db_user' role (Not ROOT) again (1), 5.608s
2021/03/13 23:05:07 -----------------------------------------------------------------------------------
2021/03/13 23:05:07 Tests Summary:
2021/03/13 23:05:07 13 (of 17) tests passed, 4 tests failed; rated as 76.47%
2021/03/13 23:05:07
2021/03/13 23:05:07 Time Spent: 7m19.284s
2021/03/13 23:05:07 -----------------------------------------------------------------------------------
name: raman_rohau, master/ad44df5 @ 2021-03-11 08:50:58 +0000
2021/03/13 23:05:07 config: tests/mysqldb-check.yml
2021/03/13 23:05:07 verbosity: 2
2021/03/13 23:05:07 -----------------------------------------------------------------------------------
2021/03/13 23:05:07 Running '2.3 MySQL DB Check', 1..16 tests
2021/03/13 23:05:07 -----------------------------------------------------------------------------------
2021/03/13 23:05:12 ✓ [2.3 MySQL DB Check] => 'mysql_db_check' role linter (1), 3.23s
2021/03/13 23:05:13 ✓ [2.3 MySQL DB Check] => 'role-mysqldb-check.yml' playbook syntax check (1), 957ms
2021/03/13 23:06:14 ✓ [2.3 MySQL DB Check] => apply 'role-mysqldb-check.yml' playbook (1), 1m1.599s
2021/03/13 23:07:25 ✓ [2.3 MySQL DB Check] => apply 'mysql_db_check' role (default settings) (1), 1m10.589s
2021/03/13 23:07:25 ✓ [2.3 MySQL DB Check] => service responds 200 (after initial rollout) (1), 401ms
2021/03/13 23:07:33 ✗ [2.3 MySQL DB Check] -> idempotency check (apply the role twice)
2021/03/13 23:07:33 Result: exit status 1
2021/03/13 23:07:33 Output:
[WARNING]: Unhandled error in Python interpreter discovery for host db-check:
error occurred on host 6bc6a85bb999: EOF on stream; last 100 lines received:
>>> /etc/sudoers: syntax error near line 120 <<< sudo: parse error in
/etc/sudoers near line 120 sudo: no valid sudoers sources found, quitting sudo:
unable to initialize policy plugin
(run, /tmp/students-2/raman_rohau/day2/2.3) => ansible-playbook testing-role-mysqldb-check.yml -i db-check, -v
rc: 2
output: |
Using /tmp/students-2/raman_rohau/day2/2.3/ansible.cfg as config file
PLAY [db-check] ****************************************************************
TASK [base : Ensure that ansible facts folder exists] **************************
fatal: [db-check]: FAILED! => {"msg": "error occurred on host 6bc6a85bb999: EOF on stream; last 100 lines received:\n>>> /etc/sudoers: syntax error near line 120 <<<\nsudo: parse error in /etc/sudoers near line 120\nsudo: no valid sudoers sources found, quitting\nsudo: unable to initialize policy plugin"}
PLAY RECAP *********************************************************************
db-check : ok=0 changed=0 unreachable=0 failed=1  skipped=0 rescued=0 ignored=0
CMD Failed: ansible-playbook testing-role-mysqldb-check.yml -i db-check, -v
2021/03/13 23:07:33 ✓ [2.3 MySQL DB Check] => service responds 200 (after idempotancy check) (1), 163ms
2021/03/13 23:07:33 ✓ [2.3 MySQL DB Check] => service is enabled (1), 156ms
2021/03/13 23:07:34 ✓ [2.3 MySQL DB Check] => service runs under proper user/group (1), 392ms
2021/03/13 23:07:34 ✓ [2.3 MySQL DB Check] => application user has no password set (1), 169ms
2021/03/13 23:08:37 ✓ [2.3 MySQL DB Check] => trying another application port (1), 1m3.392s
2021/03/13 23:09:34 ✓ [2.3 MySQL DB Check] => trying another application home dir (1), 56.68s
2021/03/13 23:10:36 ✗ [2.3 MySQL DB Check] -> trying another application user
2021/03/13 23:10:36 Result: exit status 7
2021/03/13 23:10:36 Output:
db-check
1404b232cbbf3ea1839f141fbbbe8c10a1fbb4fae190507cf2c7ee07c143df4c
Using /tmp/students-2/raman_rohau/day2/2.3/ansible.cfg as config file
PLAY [db-check] ****************************************************************
TASK [base : Ensure that ansible facts folder exists] **************************
changed: [db-check] => {"ansible_facts": {"discovered_interpreter_python": "/usr/bin/python"}, "changed": true, "gid": 0, "group": "root", "mode": "0755", "owner": "root", "path": "/etc/ansible/facts.d", "size": 4096, "state": "directory", "uid": 0}
TASK [base : Facts gathering] **************************************************
ok: [db-check]
TASK [base : Install Epel-release repo] ****************************************
ok: [db-check] => {"ansible_facts": {}, "changed": false, "msg": "", "rc": 0, "results": ["epel-release-7-11.noarch providing epel-release is already installed"]}
TASK [base : Install python-pip] ***********************************************
changed: [db-check] => {"ansible_facts": {}, "changed": true, "changes": {"installed": ["python3-pip"]}, "msg": "", "rc": 0, "results": ["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 python3-pip.noarch 0:9.0.3-8.el7 will be installed\n--> Processing Dependency: python(abi) = 3.6 for package: python3-pip-9.0.3-8.el7.noarch\n--> Processing Dependency: python3-setuptools for package: python3-pip-9.0.3-8.el7.noarch\n--> Processing Dependency: /usr/bin/python3 for package: python3-pip-9.0.3-8.el7.noarch\n--> Running transaction check\n---> Package python3.x86_64 0:3.6.8-18.el7 will be installed\n--> Processing Dependency: python3-libs(x86-64) = 3.6.8-18.el7 for package: python3-3.6.8-18.el7.x86_64\n--> Processing Dependency: libpython3.6m.so.1.0()(64bit) for package: python3-3.6.8-18.el7.x86_64\n---> Package python3-setuptools.noarch 0:39.2.0-10.el7 will be installed\n--> Running transaction check\n---> Package python3-libs.x86_64 0:3.6.8-18.el7 will be installed\n--> Processing Dependency: libtirpc.so.1()(64bit) for package: python3-libs-3.6.8-18.el7.x86_64\n--> Running transaction check\n---> Package libtirpc.x86_64 0:0.2.4-0.16.el7 will be installed\n--> Finished Dependency Resolution\n\nDependencies Resolved\n\n================================================================================\n Package Arch Version Repository Size\n================================================================================\nInstalling:\n python3-pip noarch 9.0.3-8.el7 base 1.6 M\nInstalling for dependencies:\n libtirpc x86_64 0.2.4-0.16.el7 base 89 k\n python3 x86_64 3.6.8-18.el7 updates 70 k\n python3-libs x86_64 3.6.8-18.el7 updates 6.9 M\n python3-setuptools noarch 39.2.0-10.el7 base 629 k\n\nTransaction Summary\n================================================================================\nInstall 1 Package (+4 Dependent packages)\n\nTotal download size: 9.3 M\nInstalled size: 48 M\nDownloading packages:\n--------------------------------------------------------------------------------\nTotal 18 MB/s | 9.3 MB 00:00 \nRunning transaction check\nRunning transaction test\nTransaction test succeeded\nRunning transaction\n Installing : libtirpc-0.2.4-0.16.el7.x86_64 1/5 \n Installing : python3-setuptools-39.2.0-10.el7.noarch 2/5 \n Installing : python3-pip-9.0.3-8.el7.noarch 3/5 \n Installing : python3-3.6.8-18.el7.x86_64 4/5 \n Installing : python3-libs-3.6.8-18.el7.x86_64 5/5 \n Verifying : libtirpc-0.2.4-0.16.el7.x86_64 1/5 \n Verifying : python3-libs-3.6.8-18.el7.x86_64 2/5 \n Verifying : python3-setuptools-39.2.0-10.el7.noarch 3/5 \n Verifying : python3-3.6.8-18.el7.x86_64 4/5 \n Verifying : python3-pip-9.0.3-8.el7.noarch 5/5 \n\nInstalled:\n python3-pip.noarch 0:9.0.3-8.el7 \n\nDependency Installed:\n libtirpc.x86_64 0:0.2.4-0.16.el7 python3.x86_64 0:3.6.8-18.el7 \n python3-libs.x86_64 0:3.6.8-18.el7 python3-setuptools.noarch 0:39.2.0-10.el7 \n\nComplete!\n"]}
TASK [base : Install curl] *****************************************************
ok: [db-check] => {"ansible_facts": {}, "changed": false, "msg": "", "rc": 0, "results": ["curl-7.29.0-51.el7.x86_64 providing curl is already installed"]}
TASK [base : Install wget] *****************************************************
changed: [db-check] => {"ansible_facts": {}, "changed": true, "changes": {"installed": ["wget"]}, "msg": "", "rc": 0, "results": ["Loaded plugins: fastestmirror, ovl\nLoading mirror speeds from cached hostfile\n * base: ftp.byfly.by\n * epel: mirror.datacenter.by\n * extras: ftp.byfly.by\n * updates: ftp.byfly.by\nResolving Dependencies\n--> Running transaction check\n---> Package wget.x86_64 0:1.14-18.el7_6.1 will be installed\n--> Finished Dependency Resolution\n\nDependencies Resolved\n\n================================================================================\n Package Arch Version Repository Size\n================================================================================\nInstalling:\n wget x86_64 1.14-18.el7_6.1 base 547 k\n\nTransaction Summary\n================================================================================\nInstall 1 Package\n\nTotal download size: 547 k\nInstalled size: 2.0 M\nDownloading packages:\nRunning transaction check\nRunning transaction test\nTransaction test succeeded\nRunning transaction\n Installing : wget-1.14-18.el7_6.1.x86_64 1/1 \ninstall-info: No such file or directory for /usr/share/info/wget.info.gz\n Verifying : wget-1.14-18.el7_6.1.x86_64 1/1 \n\nInstalled:\n wget.x86_64 0:1.14-18.el7_6.1 \n\nComplete!\n"]}
TASK [base : Install sudo] *****************************************************
ok: [db-check] => {"ansible_facts": {}, "changed": false, "msg": "", "rc": 0, "results": ["sudo-1.8.23-3.el7.x86_64 providing sudo is already installed"]}
TASK [base : Install iproute] **************************************************
ok: [db-check] => {"ansible_facts": {}, "changed": false, "msg": "", "rc": 0, "results": ["iproute-4.11.0-14.el7.x86_64 providing iproute is already installed"]}
TASK [user : Create group] *****************************************************
changed: [db-check] => {"ansible_facts": {}, "changed": true, "gid": 1001, "name": "mysqldb-check-test", "state": "present", "system": false}
TASK [user : Create user] ******************************************************
changed: [db-check] => {"ansible_facts": {}, "changed": true, "comment": "", "create_home": false, "group": 1001, "home": "/opt/mysqldb-check", "name": "mysqldb-check-test", "shell": "/bin/bash", "state": "present", "system": false, "uid": 1001}
TASK [user : Copy sudoers file] ************************************************
changed: [db-check] => {"changed": true, "checksum": "42a2727822455e9496147c61908d4b0bd35aed18", "dest": "/etc/sudoers.d/mysqldb-check-test", "gid": 0, "group": "root", "md5sum": "64251d7a9c1dedee2f3da631b39eeff0", "mode": "0644", "owner": "root", "size": 20, "src": "/root/.ansible/tmp/ansible_mitogen_action_a73ce48fd6d54a59/source", "state": "file", "uid": 0}
TASK [mysql_db_check : Create mysqldb check bin dir] ***************************
changed: [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 mysqldb check conf dir] **************************
changed: [db-check] => {"ansible_facts": {}, "changed": true, "gid": 1001, "group": "mysqldb-check-test", "mode": "0755", "owner": "mysqldb-check-test", "path": "/opt/mysqldb-check/conf", "size": 4096, "state": "directory", "uid": 1001}
TASK [mysql_db_check : Download mysql check bin] *******************************
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-test", "md5sum": "0b5a84cf51fcf79480b4f36b4c88153b", "mode": "0750", "msg": "OK (1818876 bytes)", "owner": "mysqldb-check-test", "size": 1818876, "src": "/root/.ansible/tmp/ansible-moduletmp-1615677016.19-boBeVp/tmpe9fwek", "state": "file", "status_code": 200, "uid": 1001, "url": "https://playpit-labs-assets.s3-eu-west-1.amazonaws.com/mysql-check/mysql-check"}
TASK [mysql_db_check : Copy Users Configuration] *******************************
changed: [db-check] => {"changed": true, "checksum": "3db27709dc597c87ce1e09125a85e2183edc93dc", "dest": "/opt/mysqldb-check/conf/mysqldb-check.conf", "gid": 1001, "group": "mysqldb-check-test", "md5sum": "9894289d078651f4a04ad9d69e50a4e1", "mode": "0644", "owner": "mysqldb-check-test", "size": 9, "src": "/root/.ansible/tmp/ansible_mitogen_action_13f396545bbfe67c/source", "state": "file", "uid": 1001}
TASK [mysql_db_check : Copy mysqldb check Service File] ************************
changed: [db-check] => {"changed": true, "checksum": "7a33259c213b5f684a84d498f2dfe16c33767387", "dest": "/usr/lib/systemd/system/mysqldb-check.service", "gid": 0, "group": "root", "md5sum": "06d118c4c4c61ef15940c3b9936a7c39", "mode": "0644", "owner": "root", "size": 309, "src": "/root/.ansible/tmp/ansible_mitogen_action_eef5841dab91d0b4/source", "state": "file", "uid": 0}
TASK [mysql_db_check : Ensure mysqldb check Service Enabled and Running] *******
changed: [db-check] => {"ansible_facts": {}, "changed": true, "enabled": true, "name": "mysqldb-check", "state": "started", "status": {"ActiveEnterTimestampMonotonic": "0", "ActiveExitTimestampMonotonic": "0", "ActiveState": "inactive", "After": "basic.target system.slice network.target systemd-journald.socket", "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 service", "DevicePolicy": "auto", "EnvironmentFile": "/opt/mysqldb-check/conf/mysqldb-check.conf (ignore_errors=no)", "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 port to become open on the host] ***************
ok: [db-check] => {"ansible_facts": {}, "changed": false, "elapsed": 10, "match_groupdict": {}, "match_groups": [], "path": null, "port": 8080, "search_regex": null, "state": "started"}
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:10:23 UTC", "ActiveEnterTimestampMonotonic": "354916696230", "ActiveExitTimestampMonotonic": "0", "ActiveState": "active", "After": "network.target basic.target system.slice systemd-journald.socket", "AllowIsolate": "no", "AmbientCapabilities": "0", "AssertResult": "yes", "AssertTimestamp": "Sat 2021-03-13 23:10:23 UTC", "AssertTimestampMonotonic": "354916695280", "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:10:23 UTC", "ConditionTimestampMonotonic": "354916695275", "Conflicts": "shutdown.target", "ControlGroup": "/docker/1404b232cbbf3ea1839f141fbbbe8c10a1fbb4fae190507cf2c7ee07c143df4c/system.slice/mysqldb-check.service", "ControlPID": "0", "DefaultDependencies": "yes", "Delegate": "no", "Description": "MYSQL check service", "DevicePolicy": "auto", "EnvironmentFile": "/opt/mysqldb-check/conf/mysqldb-check.conf (ignore_errors=no)", "ExecMainCode": "0", "ExecMainExitTimestampMonotonic": "0", "ExecMainPID": "2434", "ExecMainStartTimestamp": "Sat 2021-03-13 23:10:23 UTC", "ExecMainStartTimestampMonotonic": "354916696153", "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:10:23 UTC] ; stop_time=[n/a] ; pid=2434 ; 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:10:23 UTC", "InactiveExitTimestampMonotonic": "354916696230", "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": "2434", "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:10:23 UTC", "WatchdogTimestampMonotonic": "354916696199", "WatchdogUSec": "0"}}
PLAY RECAP *********************************************************************
db-check : ok=19  changed=13  unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
* About to connect() to localhost port 8080 (#0)
* Trying 127.0.0.1...
* Connection refused
* Trying ::1...
* Failed to connect to ::1: Cannot assign requested address
* Failed connect to localhost:8080; Cannot assign requested address
* Closing connection 0
2021/03/13 23:11:46 ✓ [2.3 MySQL DB Check] => trying another application group (1), 1m10.496s
2021/03/13 23:12:50 ✓ [2.3 MySQL DB Check] => rollout (Not ROOT) (1), 1m3.828s
2021/03/13 23:12:59 ✗ [2.3 MySQL DB Check] -> idempotency check (Not ROOT)
2021/03/13 23:12:59 Result: exit status 1
2021/03/13 23:12:59 Output:
[WARNING]: Unhandled error in Python interpreter discovery for host db-check:
error occurred on host 9f4adc273bcc: EOF on stream; last 100 lines received:
>>> /etc/sudoers: syntax error near line 120 <<< sudo: parse error in
/etc/sudoers near line 120 sudo: no valid sudoers sources found, quitting sudo:
unable to initialize policy plugin
(run, /tmp/students-2/raman_rohau/day2/2.3) => ansible-playbook testing-role-mysqldb-check.yml -i db-check, -v -u devops
rc: 2
output: |
Using /tmp/students-2/raman_rohau/day2/2.3/ansible.cfg as config file
PLAY [db-check] ****************************************************************
TASK [base : Ensure that ansible facts folder exists] **************************
fatal: [db-check]: FAILED! => {"msg": "error occurred on host 9f4adc273bcc: EOF on stream; last 100 lines received:\n>>> /etc/sudoers: syntax error near line 120 <<<\nsudo: parse error in /etc/sudoers near line 120\nsudo: no valid sudoers sources found, quitting\nsudo: unable to initialize policy plugin"}
PLAY RECAP *********************************************************************
db-check : ok=0 changed=0 unreachable=0 failed=1  skipped=0 rescued=0 ignored=0
CMD Failed:
2021/03/13 23:13:00 -----------------------------------------------------------------------------------
2021/03/13 23:13:00 Tests Summary:
2021/03/13 23:13:00 13 (of 16) tests passed, 3 tests failed; rated as 81.25%
2021/03/13 23:13:00
2021/03/13 23:13:00 Time Spent: 7m52.877s
2021/03/13 23:13:00 -----------------------------------------------------------------------------------
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment