Re: [ansible-project] ansible_distribution_major_version on the CLI

2016-02-02 Thread Reece Webb
Well that's annoying. Thanks for the explanation. Reece -- 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-project+unsubscr...@googlegroups.com. To po

Re: [ansible-project] ansible_distribution_major_version on the CLI

2016-02-01 Thread Brian Coca
Your problem here is that the adhoc command only runs a single task, so you cannot run 'setup' (what runs when you gather_facts) to get the info you need, also adhoc tasks do not have a way to add a when: condition. You need a playbook. -- Brian Coca -- You received this message because you ar

[ansible-project] ansible_distribution_major_version on the CLI

2016-02-01 Thread Reece Webb
Greets, Hopefully this is a ridiculously simple question... I'm trying to put together a one-liner (# ansible all -m copy...) that will copy a file to a linux host only if the OS is a specific version... RHEL7, for example, skipping any RHEL5. "ansible_distribution_major_version" seems to be t