Skip to content

Commit

Permalink
docs: add troubleshooting section
Browse files Browse the repository at this point in the history
  • Loading branch information
gofrolist authored Oct 6, 2021
1 parent 41773e6 commit 05848f2
Showing 1 changed file with 28 additions and 5 deletions.
33 changes: 28 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,18 +125,41 @@ jobs:

> TIP: N.B. Use `gofrolist/molecule-action@v2` or any other valid tag, or branch, or commit SHA instead of `v2` to pin the action to use a specific version.

If your role require some python modules (for example `netaddr`) you can install them in molecule prepare step
## Troubleshooting
If you see this error while you executing `apt_key` task
```
FAILED! => {"changed": false, "msg": "Failed to find required executable gpg in paths: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin"}
```
That means your docker image require some python modules `gpg` and you can install them in molecule prepare step or embed it in your dockerfile.
```yaml
---
- name: Prepare
hosts: all
tasks:
- name: dependency for apt_key
apt:
name: python3-gpg
state: present
update_cache: true
```

If you see this error while you executing `pip` task
```
FAILED! => {"changed": false, "msg": "No package matching 'python-pip' is available"}
```
That means your docker image is missing `pip` and you can install them in molecule prepare step or embed it in your dockerfile.
```yaml
---
- name: Prepare
hosts: all

tasks:
- name: Install netaddr dependency on controlling host (virtualenv)
pip:
name: netaddr
delegate_to: 127.0.0.1
- name: dependency for pip
apt:
name: python3-pip
state: present
update_cache: true
```
## Maintenance
Expand Down

0 comments on commit 05848f2

Please sign in to comment.