2

我正在尝试使用 Ansible Tower 在管理租户中针对 Openstack 运行一个简单的剧本,两者都在 localhost 上运行。这是脚本:

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

我做了以下配置:

  • 证书:

在此处输入图像描述

  • 模板:

在此处输入图像描述

  • 库存测试:

在此处输入图像描述

使用此配置,我收到此错误:

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}

知道可能是什么吗?看起来是一个凭证问题。

4

1 回答 1

0

取消勾选Enable Privilege Escalation- 没有必要。您的 OpenStack 特权/授权将与您的 OpenStack 凭据(在本例中为管理员)相关联,而不是与运行 Ansible 任务的用户相关联。

于 2018-11-07T22:17:45.287 回答