Move if is_truenas outside of variable definition.