Question: I would like to change the legend style of the following picture generated in Matlab:

```
x1=-5;
x2=5;
y1=-5;
y2=5;
x = [x1, x2, x2, x1, x1];
y = [y1, y1, y2, y2, y1];
fill(x,y,'b')
legend('A')

```

[![enter image description here](https://i.stack.imgur.com/nsQdo.jpg)](https://i.stack.imgur.com/nsQdo.jpg)

As you can see the legend displays a blue rectangle. What I would like is a **filled blue circle** in place of the rectangle **as if the picture was generated as a scatter plot**. How can I obtain that?

Answer: 
Your idea with `when` is almost there. Read about <https://docs.ansible.com/ansible/latest/user_guide/playbooks_conditionals.html#register-variables>, then you can do:

```
  tasks:

  - name: npm config get strict-ssl
    command: npm config get strict-ssl
    register: npm_strict_ssl
    changed_when: false

  - name: Setting up NodeJS
    command: npm config set strict-ssl false
    when: "npm_strict_ssl['stdout'] == 'true'"

```

I will also add that the specific settings you want to disable, strict SSL, smells like a very bad idea. Please consider fixing the root cause of the problem instead of lowering down security.
You might want to use the construct

```
- command: npm config set strict-ssl false
  args:
    creates: "{{ lock_file }}"

```

If there is no *lock\_file* created by the *command* you might want to run the *command* in a *block* and create a *lock\_file* on your own.

As a *lock\_file* can be used any file that will be created by the *command*.