john...@caradvice.com.au napisał:
>
>>
>> without having to edit any files between getting it finished...
>
>
>Methodological issue, not practical: it feels dirty to edit a file
>between
>the test and the application.
>Is creating and editing a new file the only way to get from the
>"tested"
>codebase to applying it to production hosts?
I'm using a combination of tags and --limit. I tag roles at the play level:
- hosts: db
roles:
- {name: common, tags: common}
- {name: postgresql, tags: postgresql}
And then use "ansible-playbook -i staging/inv -l db --tags postgresql" to only run that one role.
On the other hand, do you really want to run only that new role, and whole of it?
It might be enough to just use --limit, or you might want to use more tags inside role (I'm using "bbb" for trying only some tasks when debugging).
>
>On Tuesday, June 3, 2014 1:47:43 PM UTC+10, James Cammarata wrote:
>>
>> If you're just testing that one role, why not make a simple playbook
>that
>> calls just that?
>>
>> - hosts: all
>> roles:
>> - thisone
>>
>> That should be all you need, since you're pointing it at different
>> inventory sources.
>>
>>
>> On Mon, Jun 2, 2014 at 10:06 PM, <
john...@caradvice.com.au
><javascript:>>
>> wrote:
>>
>>> I want to develop/test my new role on a virtual node thence apply
>just
>>> that one play, um role, against a host that really matters.
>>> How do I do that without having to edit any files between getting it
>
>>> finished and applying it to production?
>>>
>>> # this doesn't work...
>>>
>>> % ansible-playbook -i testing roles/thisone?
>>> % ansible-playbook -i production roles/thisone?
>>>
>>>
>>> --tags thisone
>>>
>>> looked promising but it would mean going through everything applying
>
>>> tags, and then trying to remember what I called them all.
>>>
>>> --
>>> 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 <javascript:>.
>>> <javascript:>.
><
https://groups.google.com/d/msgid/ansible-project/eba3fed7-46af-4c80-9d41-573bd34d5711%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
--
Wysłane za pomocą K-9 Mail.