2

I am trying to run a simple playbook against Openstack in admin tenant using Ansible Tower, both running on localhost. Here is the script:

--- # 
- hosts: localhost
  gather_facts: no
  connection: local 
  tasks:
  - name: Security Group
    os_security_group:
      state: present
      name: example

I have done the following configuration:

  • Credentials:

enter image description here

  • Template:

enter image description here

  • Inventory test:

enter image description here

With this configuration, I am getting this error:

TASK [Security Group] **********************************************************
13:35:48
fatal: [localhost]: FAILED! => {"changed": false, "module_stderr": "sudo: effective uid is not 0, is /usr/bin/sudo on a file system with the 'nosuid' option set or an NFS file system without root privileges?\n", "module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1}

Any idea what can be? Looks like is a credential problem.

Albert
  • 191
  • 1
  • 3
  • 23

1 Answers1

0

Untick Enable Privilege Escalation - it's not necessary. Your OpenStack privilege/authorisation will be tied to your OpenStack credentials (admin in this case), not the user running the Ansible task.

Matt P
  • 2,452
  • 1
  • 12
  • 15