Last active
September 19, 2022 07:28
-
-
Save aminvakil/b1734554a9446ed4840c9b2d31e1bde2 to your computer and use it in GitHub Desktop.
Schema bug with user module
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
ansible-galaxy role init lint_test | |
cd lint_test/ | |
ansible-lint . | |
##### | |
# Current errors are ok and we don't have anything to do with them | |
##### | |
echo "- name: Create user | |
user: | |
name: lintuser" >> tasks/main.yml | |
ansible-lint . | |
##### | |
# schema: {'name': 'create user', 'user': {'name': 'lintuser'}} is not valid under any of the given schemas (schema[tasks]) | |
# Why is it not valid? | |
##### | |
sed -i 's/user\:/ansible.builtin.user\:/g' tasks/main.yml | |
ansible-lint . | |
##### | |
# Error has been gone now, using fqcns are not mandatory AFAIK and the only problem I have seen so far is with user module. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment