小编Jos*_*nis的帖子

如何在 Centos 7 中永久设置 ulimit -n 8192?

我想为 Centos 7 中的所有用户永久设置打开文件限制,但在谷歌上似乎有很多相互矛盾的信息。

centos ulimit centos7

15
推荐指数
3
解决办法
7万
查看次数

Ansible become_user 没有正确选择路径

这是显示我认为有问题的代码:

# Debugging path problems with sudo
---
- hosts: webservers
  remote_user: root
  tasks:
  - name: echo path
    command: echo $PATH
    register: output
    changed_when: False

  - name: display root path output
    debug: "msg={{ output.stdout }}"

  # Now try as apache
  - name: echo path
    command: echo $PATH
    become: true
    become_user: apache
    become_method: sudo
    register: output
    changed_when: False

  - name: display wrong output
    debug: "msg={{ output.stdout }}"

  # This is the fix
  - name: echo path
    command: echo $PATH
    environment:
      PATH: …
Run Code Online (Sandbox Code Playgroud)

sudo path ansible

5
推荐指数
1
解决办法
5340
查看次数

标签 统计

ansible ×1

centos ×1

centos7 ×1

path ×1

sudo ×1

ulimit ×1