HenryGP / om_ansible

Minimalistic, disposable Ops Manager environment with Ansible
19 stars 17 forks source link

local mode, wrong rpm, no failure installing it #23

Closed emisca closed 5 years ago

emisca commented 5 years ago

In local mode I put by mistake the ppc64le RPM and obviously it failed to install, but the script said that the RPM was installed.......:

$ docker exec -it provisioner /opt/ansible-2.3.1.0/bin/ansible-playbook /root/om_ansible.yaml

PLAY [General tasks on all servers] **************************************************************************************************************************************************************************

TASK [Modifying /etc/hosts] **********************************************************************************************************************************************************************************
skipping: [opsmgr]
skipping: [node1]
skipping: [node2]
skipping: [backup]

PLAY [Installing Ops Manager] ********************************************************************************************************************************************************************************

TASK [Copy mongodb repository files] *************************************************************************************************************************************************************************
ok: [opsmgr]

TASK [Update yum] ********************************************************************************************************************************************************************************************
skipping: [opsmgr]

TASK [Install MongoDB Enterprise dependencies] ***************************************************************************************************************************************************************
ok: [opsmgr] => (item=[u'cyrus-sasl', u'cyrus-sasl-gssapi', u'cyrus-sasl-plain', u'krb5-libs', u'libcurl', u'libpcap', u'lm_sensors-libs', u'net-snmp', u'net-snmp-agent-libs', u'openldap', u'openssl', u'rpm-libs', u'tcp_wrappers-libs'])

TASK [Install mongodb] ***************************************************************************************************************************************************************************************
ok: [opsmgr]

TASK [Create dbpath for Application Database] ****************************************************************************************************************************************************************
ok: [opsmgr]

TASK [Copy mongod configuration file] ************************************************************************************************************************************************************************
ok: [opsmgr]

TASK [Enable mongod service] *********************************************************************************************************************************************************************************
ok: [opsmgr]

TASK [Set SELinux to permissive] *****************************************************************************************************************************************************************************
skipping: [opsmgr]

TASK [Changing SELinux context] ******************************************************************************************************************************************************************************
skipping: [opsmgr]

TASK [Start mongod for the Application Database] *************************************************************************************************************************************************************
ok: [opsmgr]

TASK [Copy SSL related files to Ops Manager server] **********************************************************************************************************************************************************
ok: [opsmgr]

TASK [Download Ops Manager RPM] ******************************************************************************************************************************************************************************
skipping: [opsmgr]

TASK [Copy the local installer] ******************************************************************************************************************************************************************************
ok: [opsmgr]

TASK [Install the RPM] ***************************************************************************************************************************************************************************************
ok: [opsmgr]

TASK [Enable mongodb-mms service] ****************************************************************************************************************************************************************************
fatal: [opsmgr]: FAILED! => {"changed": false, "failed": true, "msg": "Could not find the requested service mongodb-mms: host"}
...ignoring

TASK [Copy configuration files] ******************************************************************************************************************************************************************************
fatal: [opsmgr]: FAILED! => {"changed": true, "failed": true, "msg": "Destination directory /opt/mongodb/mms/conf does not exist"}
...ignoring

TASK [Create directory for head database] ********************************************************************************************************************************************************************
fatal: [opsmgr]: FAILED! => {"changed": false, "failed": true, "gid": 0, "group": "root", "mode": "0755", "msg": "chown failed: failed to look up user mongodb-mms", "owner": "root", "path": "/data/head", "size": 4096, "state": "directory", "uid": 0}
...ignoring

TASK [Create directory for fsstore] **************************************************************************************************************************************************************************
fatal: [opsmgr]: FAILED! => {"changed": false, "failed": true, "gid": 0, "group": "root", "mode": "0755", "msg": "chown failed: failed to look up user mongodb-mms", "owner": "root", "path": "/data/fsstore", "size": 4096, "state": "directory", "uid": 0}
...ignoring

TASK [Copy SSL related files to Ops Manager server] **********************************************************************************************************************************************************
ok: [opsmgr]

TASK [Start mongodb-mms service] *****************************************************************************************************************************************************************************
fatal: [opsmgr]: FAILED! => {"changed": false, "failed": true, "msg": "Could not find the requested service mongodb-mms: host"}
...ignoring

TASK [Wait for port 8080 to become available] ****************************************************************************************************************************************************************
^C [ERROR]: User interrupted execution
HenryGP commented 5 years ago

Adding some safety nets to this task, the execution will fail when it can't find or install the package. The messaging is the default provided by Ansible but it will become clear at the moment of failure. Stay tuned for the merge of this PR: https://github.com/HenryGP/om_ansible/pull/27