I found a solution to this.  There is an alias for the module called 
os_server_action*s* and I found if I used that, the playbook ran as 
expected.

On Thursday, October 19, 2017 at 10:27:18 AM UTC-5, Pete Pedersen wrote:
>
> Hi all,
>
> I'm using Ansible Tower, 2.3.1.0, with Python 2.7.5.
>
> I wrote the following playbook to automate rebuilding of servers with new 
> images.
>
> ---
> - name:  Rebuild Servers
>   hosts: localhost
>   gather_facts:  false
>   tasks:
>     - name: Rebuild with new image
>       os_server_action:
>         action: rebuild
>         auth:
>           auth_url: "{{ lookup('env','OS_AUTH_URL') }}"
>           username: "{{ lookup('env','OS_USERNAME') }}"
>           password: "{{ lookup('env','OS_PASSWORD') }}"
>           project_name: "{{ lookup('env','OS_PROJECT_NAME') }}"
>           user_domain_id: 'ea8b27da70d94b058aa7f7e0f5ff0653'
>           project_domain_id: 'ea8b27da70d94b058aa7f7e0f5ff0653'
>         image: rhel7_extended
>         server: "{{ item }}"
>       with_items:
>         - dev1
>         - dev2
>         - dev3
>         - dev4
>         - dev5
>         - dev6
>         - dev7
>         - cm1
>         - devweb1
>         - devops
>         - eqube1
>
> When I run it, I get the following:
>
> ERROR! no action detected in task. This often indicates a misspelled 
> module name, or incorrect module path.
>
> This follows the example in the documentation closely and I find no 
> spelling errors.  Even when I limit it to one server, server: dev1, I get 
> the same error.
>
> Anybody have any ideas?
>
> Thanks....Pete
>

-- 
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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/1a66236b-521b-4e7a-b54f-9510adc6d15c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to