Open cmoulliard opened 8 years ago
It looks like that the provisioning has been done correctly excepted that a condition fails "Conditional check failed" but no java process has been started on the machine app1 or app2
ansible-playbook -i inventory provisioning/site.yml -vv --ask-vault-pass Using /Users/chmoulli/Temp/fabric8-ansible-spring-boot/ansible.cfg as config file Vault password: [DEPRECATION WARNING]: Instead of sudo/sudo_user, use become/become_user and make sure become_method is 'sudo' (default). This feature will be removed in a future release. Deprecation warnings can be disabled by setting deprecation_warnings=False in ansible.cfg. 1 plays in provisioning/site.yml PLAY [Provision appservers] **************************************************** TASK [setup] ******************************************************************* ok: [app1] ok: [app2] TASK [java : Copy rpm to provisioned machine] ********************************** ok: [app2] => {"changed": false, "checksum": "999a62d321906557ec2edeb6e226bc1d17f896ce", "dest": "/home/vagrant/jre-8u45-linux-x64.rpm", "gid": 0, "group": "root", "mode": "0644", "owner": "root", "path": "/home/vagrant/jre-8u45-linux-x64.rpm", "size": 41426623, "state": "file", "uid": 0} ok: [app1] => {"changed": false, "checksum": "999a62d321906557ec2edeb6e226bc1d17f896ce", "dest": "/home/vagrant/jre-8u45-linux-x64.rpm", "gid": 0, "group": "root", "mode": "0644", "owner": "root", "path": "/home/vagrant/jre-8u45-linux-x64.rpm", "size": 41426623, "state": "file", "uid": 0} TASK [java : Install JRE] ****************************************************** ok: [app2] => {"changed": false, "msg": "", "rc": 0, "results": []} ok: [app1] => {"changed": false, "msg": "", "rc": 0, "results": []} TASK [java : Add script setting JAVA_HOME and JRE_HOME] ************************ ok: [app1] => {"changed": false, "gid": 0, "group": "root", "mode": "0644", "owner": "root", "path": "/etc/profile.d/java.sh", "size": 78, "state": "file", "uid": 0} ok: [app2] => {"changed": false, "gid": 0, "group": "root", "mode": "0644", "owner": "root", "path": "/etc/profile.d/java.sh", "size": 78, "state": "file", "uid": 0} TASK [app : Create App user] *************************************************** ok: [app1] => {"append": false, "changed": false, "comment": "", "group": 501, "home": "/opt/springboot-camel-2.2.98-SNAPSHOT", "move_home": false, "name": "springboot-camel", "shell": "/sbin/nologin", "state": "present", "uid": 501} ok: [app2] => {"append": false, "changed": false, "comment": "", "group": 501, "home": "/opt/springboot-camel-2.2.98-SNAPSHOT", "move_home": false, "name": "springboot-camel", "shell": "/sbin/nologin", "state": "present", "uid": 501} TASK [app : Check if App is already installed] ********************************* ok: [app1] => {"changed": false, "stat": {"atime": 1456411422.5691614, "checksum": "ec4245a33dfbaa25c1351db93a97ac5a3ae36626", "ctime": 1456392707.1723058, "dev": 2049, "exists": true, "gid": 501, "gr_name": "springboot-camel", "inode": 279653, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "md5": "a776aad883a48abd1fb3305c194d86d6", "mode": "0555", "mtime": 1456392700.4379416, "nlink": 1, "path": "/opt/springboot-camel-2.2.98-SNAPSHOT", "pw_name": "springboot-camel", "rgrp": true, "roth": true, "rusr": true, "size": 31374035, "uid": 501, "wgrp": false, "woth": false, "wusr": false, "xgrp": true, "xoth": true, "xusr": true}} ok: [app2] => {"changed": false, "stat": {"atime": 1456411423.5486698, "checksum": "ec4245a33dfbaa25c1351db93a97ac5a3ae36626", "ctime": 1456392707.6027212, "dev": 2049, "exists": true, "gid": 501, "gr_name": "springboot-camel", "inode": 279180, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "md5": "a776aad883a48abd1fb3305c194d86d6", "mode": "0555", "mtime": 1456392707.3686042, "nlink": 1, "path": "/opt/springboot-camel-2.2.98-SNAPSHOT", "pw_name": "springboot-camel", "rgrp": true, "roth": true, "rusr": true, "size": 31374035, "uid": 501, "wgrp": false, "woth": false, "wusr": false, "xgrp": true, "xoth": true, "xusr": true}} TASK [app : Download App] ****************************************************** skipping: [app1] => {"changed": false, "skip_reason": "Conditional check failed", "skipped": true} skipping: [app2] => {"changed": false, "skip_reason": "Conditional check failed", "skipped": true} TASK [app : Change permissions of service] ************************************* ok: [app1] => {"changed": false, "gid": 501, "group": "springboot-camel", "mode": "0555", "owner": "springboot-camel", "path": "/opt/springboot-camel-2.2.98-SNAPSHOT", "size": 31374035, "state": "file", "uid": 501} ok: [app2] => {"changed": false, "gid": 501, "group": "springboot-camel", "mode": "0555", "owner": "springboot-camel", "path": "/opt/springboot-camel-2.2.98-SNAPSHOT", "size": 31374035, "state": "file", "uid": 501} PLAY RECAP ********************************************************************* app1 : ok=7 changed=0 unreachable=0 failed=0 app2 : ok=7 changed=0 unreachable=0 failed=0
but
the playbook doesn't run the java; thats what the kansible pods do.
So once you run kansible rc appservers you should see 2 pods startup then there should be java running on each machine
kansible rc appservers
It looks like that the provisioning has been done correctly excepted that a condition fails "Conditional check failed" but no java process has been started on the machine app1 or app2
but