Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Chapter 13 (book version 2.1) molecule commands do not execute as expected #509

Answered by geerlingguy
elexwiz asked this question in Q&A
Discussion options

I keep getting ansible_os_family errors when running the molecule converge commands in the "Testing the Playbook" section of Chapter 13. The exact error is,

fatal: [instance]: FAILED! => {"msg": "The conditional check 'ansible_os_family == 'Debian'' failed. The error was: error while evaluating conditional (ansible_os_family == 'Debian'): 'ansible_os_family' is undefined\n\nThe error appears to be in '/home/shawn/Documents/ansible/chapter8/molecule/default/converge.yml.

I have attached the files as I'm using them, including the full output of the molecule converge command. I recognize that molecule may have changed considerably between the Jeff's video #8 and the publishing date for Ansible for DevOps v. 2.1. Unfortunately, I don't know enough about Molecule to know where to start troubleshooting, nor have I been able to find anything on Google. Why am I getting this error? Can someone point me in the right direction? Thank you!!!

molecule_errors.pdf
converge.yml.pdf
molecule.yml.pdf

edit: spelling, grammar

You must be logged in to vote

You will need gather_facts: true in your converge.yml if you want to have variables like ansible_os_family available to you.

Replies: 1 comment 1 reply

Comment options

You will need gather_facts: true in your converge.yml if you want to have variables like ansible_os_family available to you.

You must be logged in to vote
1 reply
Comment options

Thank you, Jeff. gather_facts: true solved that problem.

Answer selected by elexwiz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet

AltStyle によって変換されたページ (->オリジナル) /