This is what you need to know about bash variables and quoting:
For the following examples, the variable ${text} is set to Hello:
- Variables are expanded inside double quotes. e.g.
"${text}" => Hello
- Variables are not expanded inside single quotes. e.g.
'${text}' => ${text}
- Single quotes have no special meaning inside double quotes and vice-versa. e.g.
"'${text}'" => 'Hello' and '"${text}"' => "${text}"
- If you need to place a double-quote inside a double-quoted string, or a single quote inside a single-quoted string, then it must be escaped. e.g.
"\"${text}\"" => "Hello" and '\'${text}\'' => '${text}'
With all that said, in your case, you want the variables to be expanded, so you should enclose the entire --extra-vars value in double quotes. According to the Ansible website, the value of each of these extra variables does not need to be quoted, unless it contains spaces. To be safe, you can quote the variables as you might not be able to control their values.
Try this. I have added extra line breaks to make the code easier to understand:
ansible-playbook -i inventory.yml playbook.yml --extra-vars \
"username='${login}' \
fullname='${username}' \
password='${password}' \
groups=['Users','Remote Desktop Users'] \
"