ERROR! no action dected in task. os_server_action action: rebuild

21 views
Skip to first unread message

Pete Pedersen

unread,
Oct 19, 2017, 11:27:18 AM10/19/17
to Ansible Project
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

Pete Pedersen

unread,
Oct 25, 2017, 4:21:27 PM10/25/17
to Ansible Project
I found a solution to this.  There is an alias for the module called os_server_actions and I found if I used that, the playbook ran as expected.
Reply all
Reply to author
Forward
0 new messages