-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Chapter 13 (book version 2.1) molecule commands do not execute as expected #509
-
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
Beta Was this translation helpful? Give feedback.
All reactions
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
-
You will need gather_facts: true in your converge.yml if you want to have variables like ansible_os_family available to you.
Beta Was this translation helpful? Give feedback.
All reactions
-
Thank you, Jeff. gather_facts: true solved that problem.
Beta Was this translation helpful? Give feedback.