Open nka11 opened 4 years ago
I see that it is not comprehensive but an incredible first shot at this. Glanced over the changes - need to examine in more detail. For example, I am not clear on the call to /lmi to determine Docker status.
Hi Ram,
I gess you're talking about the call in first_steps role. It's basically the same way you call /lmi with password "admin" to see if first steps have to be processed, as the password in docker is injected by environment var at docker run.
For the handlers, I just read the facts and it's fine. I let you have a closer look and you might feel it as comprehensive as I felt the first_steps role at first analyse :)
This is good - I just need to get the time to test it before I can merge.
@ram-ibm any idea on how to implement the docker snapshot publish (PUT /core/docker/publish) and run it instead of the commit handler ?
in theory adding a new handler
with the when condition for the docker model should work
However I am trying this using a custom role with no luck yet
@Scoi4101 :+1: thanks for the snip, unfortunately it won't be enough, the handler has to be notified from the other roles.
with your help I fixed this issue for the "Commit Changes" handler by including a dedicated tasks file with the conditionals (last commit)
Nice !!! Can we add the same thing for the Restart Reverse Proxy and Restart Runtime Handler ?
https://docs.ansible.com/ansible/2.3/playbooks_intro.html
handlers:
- name: restart memcached
service: name=memcached state=restarted
listen: "restart web services"
- name: restart apache
service: name=apache state=restarted
listen: "restart web services"
tasks:
- name: restart everything
command: echo "this task will restart the web services"
notify: "restart web services"
My idea was to use the listen option and then either run the appliance specific command or write out a message if it is not applicable and it is Docker.
Fixes for making these roles friendly with ISAM docker deployement
REF: IBM-Security/isam-ansible-roles#175