我正在尝试运行 Ansible playbook 命令并收到如下错误。
Run Code Online (Sandbox Code Playgroud)fatal: [localhost]: FAILED! => {"changed": false, "msg": "Aborting, target uses selinux but python bindings (libselinux-python) aren't installed!"}
当我检查 libselinux-python 时,它显示它已经可用。
[root@host all]# sudo yum list installed |grep libselinux-python
libselinux-python3.x86_64 2.5-15.el7 @rhel-7-server-rpms
Run Code Online (Sandbox Code Playgroud)
如果有人遇到并解决了这个问题,请提供您的意见。
下面是我安装在服务器上的 Python 和 Ansible 版本。
[root@ xxx bin]# python --version
Python 3.6.5
[root@xxx bin]# which python
/root/.pyenv/shims/python
[root@xxx bin]# ansible --version
ansible 2.9.9
config file = /etc/ansible/ansible.cfg
configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
ansible python module location = /root/.pyenv/versions/3.6.5/lib/python3.6/site-packages/ansible
executable location = /root/.pyenv/versions/3.6.5/bin/ansible …Run Code Online (Sandbox Code Playgroud) 我在带有 istio 服务网格的 openshift 容器平台中部署了一个容器化应用程序/服务。在 istio 虚拟服务 yaml 中,我想验证 http 请求是否具有标头(例如:版本)且值为 v1。我在虚拟服务 yaml 中添加了以下配置来验证标头。但我正在寻找可用的选项,使用 loadbalancer/ingress/openshif 路由等在 HTTP 请求中注入此标头。因为我的 istio-ingressgateway 服务是使用 ClusterIp 部署的。我使用 openshift 路由将外部流量发送到 ingressgateway。请分享向http请求添加标头的可能方法
http:
- match:
- headers: # Match header
version: # header that we decided for dark release
exact: v1 # exact match
Run Code Online (Sandbox Code Playgroud)