--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Actually, if it was up to me I would say that you should explicitly set a UID for both users otherwise you end up with the same user on different machines having different UIDs and when you are trying to manage users across lots of machines it becomes a lot harder.Adam
--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Actually that is pretty simple. You can set a default value for a variable either for a role or using a standard jinja2 filter...
Copy: backup={{backupfile|default (no)}}....
At least I think that that should work.
Adam.
--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
--
You received this message because you are subscribed to a topic in the Google Groups "Ansible Project" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ansible-project/JD55w43upYE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ansible-proje...@googlegroups.com.
I notice that the tasks are very 'strict'. Once we provide an optional param, the rest of the lists must provide it too.
Say. I want to create two users:
vars:
- users:
- { name: test1, uid: 1234 }
- { name: test2 }
Ideal case would be:
tasks:
- name: creating user
user: name={{ item.name }} uid={{ item.uid }}
with_items: users
ie, I hope Ansible will be smart enough to ignore the optional 'uid' for 'test2' but it wont.
I had no idea that was possible, I've been using all sorts of kludges to achieve the same.
--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
"syslog: "{% if ansible_distribution_version|truncate(1,true,'') >= '6' %}rsyslog{% else %}syslog{% endif %}""
That's super gross IMHO... I would not want to see that in *anyone's* playbooks as that goes against much of the simplicity that Ansible seeks to achieve.
--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
On Jan 14, 2014 8:01 AM, "Michael DeHaan" <mic...@ansibleworks.com> wrote:
>
> The super easiest way to deal with things is actually to just have a group for each type of system and then use group variables.
>
I agree that that is an easy solution. I would do that if I could find a way to include variable files within variable files... that way I could have a generic RedHat file that was included in both the RedHat5 and RedHat6 files.
Then RedHat5 and RedHat6 groups could exist with the maximum of reusability.
If this facility exists then I apologise, but I couldn't find it in the documentation.
Adam.
--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.