Skip to content
This repository has been archived by the owner on Jan 5, 2023. It is now read-only.

Cleanup output, use loop over with_items. #33

Merged
merged 2 commits into from
Apr 14, 2021
Merged

Cleanup output, use loop over with_items. #33

merged 2 commits into from
Apr 14, 2021

Conversation

robertdebock
Copy link
Contributor

I noticed molecule destroy show quite some information:

TASK [Wait for instance(s) deletion to complete] *******************************
FAILED - RETRYING: Wait for instance(s) deletion to complete (300 retries left).
changed: [localhost] => (item={'started': 1, 'finished': 0, 'ansible_job_id': '333564963040.96040', 'results_file': '/home/robertdb/.ansible_async/333564963040.96040', 'changed': True, 'failed': False, 'item': {'command': '/sbin/init', 'image': 'robertdebock/fedora:rawhide', 'name': 'xinetd-fedora-rawhide', 'pre_build_image': True, 'privileged': True, 'volumes': ['/sys/fs/cgroup:/sys/fs/cgroup:ro']}, 'ansible_loop_var': 'item'})

This change reduces that ouput to:

TASK [Wait for instance(s) deletion to complete] *******************************
FAILED - RETRYING: Wait for instance(s) deletion to complete (300 retries left).
ok: [localhost] => (item=xinetd-fedora-rawhide)

Hope that helps to clean the output a little more.

I noticed `molecule destroy` show quite some information:

```
TASK [Wait for instance(s) deletion to complete] *******************************
FAILED - RETRYING: Wait for instance(s) deletion to complete (300 retries left).
changed: [localhost] => (item={'started': 1, 'finished': 0, 'ansible_job_id': '333564963040.96040', 'results_file': '/home/robertdb/.ansible_async/333564963040.96040', 'changed': True, 'failed': False, 'item': {'command': '/sbin/init', 'image': 'robertdebock/fedora:rawhide', 'name': 'xinetd-fedora-rawhide', 'pre_build_image': True, 'privileged': True, 'volumes': ['/sys/fs/cgroup:/sys/fs/cgroup:ro']}, 'ansible_loop_var': 'item'})
```

This change reduces that ouput to:

```
TASK [Wait for instance(s) deletion to complete] *******************************
FAILED - RETRYING: Wait for instance(s) deletion to complete (300 retries left).
ok: [localhost] => (item=xinetd-fedora-rawhide)
```

Hope that helps to clean the output a little more.
@robertdebock
Copy link
Contributor Author

I think the broken builds are not related to the changes in this PR:

  failed: [localhost] (item=instance) => {"ansible_job_id": "852658138576.6199", "ansible_loop_var": "item", "attempts": 1, "changed": false, "finished": 1, "item": {"ansible_job_id": "852658138576.6199", "ansible_loop_var": "item", "changed": true, "failed": false, "finished": 0, "item": {"image": "docker.io/pycontribs/centos:8", "name": "instance", "pre_build_image": true}, "results_file": "/home/runner/.ansible_async/852658138576.6199", "started": 1}, "msg": "Failed to import the required Python library (Docker SDK for Python: docker (Python >= 2.7) or docker-py (Python 2.6)) on fv-az176-875's Python /usr/bin/python2. Please read module documentation and install in the appropriate location. If the required library is installed, but Ansible is using the wrong Python interpreter, please consult the documentation on ansible_python_interpreter, for example via `pip install docker` or `pip install docker-py` (Python 2.6). The error was: No module named requests.exceptions"}

@ssbarnea ssbarnea added the bug This issue/PR relates to a bug. label Apr 14, 2021
@ssbarnea ssbarnea merged commit 9760c28 into ansible-community:master Apr 14, 2021
ssbarnea added a commit that referenced this pull request May 26, 2021
I noticed `molecule destroy` show quite some information:

```
TASK [Wait for instance(s) deletion to complete] *******************************
FAILED - RETRYING: Wait for instance(s) deletion to complete (300 retries left).
changed: [localhost] => (item={'started': 1, 'finished': 0, 'ansible_job_id': '333564963040.96040', 'results_file': '/home/robertdb/.ansible_async/333564963040.96040', 'changed': True, 'failed': False, 'item': {'command': '/sbin/init', 'image': 'robertdebock/fedora:rawhide', 'name': 'xinetd-fedora-rawhide', 'pre_build_image': True, 'privileged': True, 'volumes': ['/sys/fs/cgroup:/sys/fs/cgroup:ro']}, 'ansible_loop_var': 'item'})
```

This change reduces that ouput to:

```
TASK [Wait for instance(s) deletion to complete] *******************************
FAILED - RETRYING: Wait for instance(s) deletion to complete (300 retries left).
ok: [localhost] => (item=xinetd-fedora-rawhide)
```

Hope that helps to clean the output a little more.

Co-authored-by: Sorin Sbarnea <ssbarnea@redhat.com>
ssbarnea added a commit that referenced this pull request May 26, 2021
I noticed `molecule destroy` show quite some information:

```
TASK [Wait for instance(s) deletion to complete] *******************************
FAILED - RETRYING: Wait for instance(s) deletion to complete (300 retries left).
changed: [localhost] => (item={'started': 1, 'finished': 0, 'ansible_job_id': '333564963040.96040', 'results_file': '/home/robertdb/.ansible_async/333564963040.96040', 'changed': True, 'failed': False, 'item': {'command': '/sbin/init', 'image': 'robertdebock/fedora:rawhide', 'name': 'xinetd-fedora-rawhide', 'pre_build_image': True, 'privileged': True, 'volumes': ['/sys/fs/cgroup:/sys/fs/cgroup:ro']}, 'ansible_loop_var': 'item'})
```

This change reduces that ouput to:

```
TASK [Wait for instance(s) deletion to complete] *******************************
FAILED - RETRYING: Wait for instance(s) deletion to complete (300 retries left).
ok: [localhost] => (item=xinetd-fedora-rawhide)
```

Hope that helps to clean the output a little more.

Co-authored-by: Sorin Sbarnea <ssbarnea@redhat.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug This issue/PR relates to a bug.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants