小编tha*_*lin的帖子

Ansible“ansible_python_interpreter”错误

我想安装 influxdb 并使用 ansible 配置。文件复制和 influxdb 配置正常,但创建数据库和用户创建部分会出现“ansible_python_interpreter”错误。

我搜索了这个错误并尝试了一些东西,但我无法自己解决这个问题

这是我的 ansible 主机文件

[loadbalancer]
lb      ansible_host=192.168.255.134

[loadbalancer:vars]
ansible_python_interpreter="/usr/bin/python3"
#ansible_python_interpreter="/usr/bin/env python"
#ansible_python_interpreter="/usr/libexec/platform-python"
Run Code Online (Sandbox Code Playgroud)

这是我的 yaml 文件

# influxdb install and configuration

---
  - hosts: lb
    become: true
    tasks:
      - name: Copy Repo Files
        copy:
          src: ./files/influxdb.j2
          dest: /etc/yum.repos.d/influxdb.repo
          remote_src: no
      - name: Install Influxdb
        yum:
          name: influxdb
          state: latest
        notify:
             influxdb_ok
      - name: Crete Database
        community.general.influxdb_database:
          hostname: 192.168.255.134
          database_name: deneme
      - name: Create User
        community.general.influxdb_user:
          user_name: deneme_user
          user_password: deneme123

    handlers:
      - name: Start Influx …
Run Code Online (Sandbox Code Playgroud)

python python-3.x ansible influxdb

6
推荐指数
2
解决办法
4万
查看次数

入口无地址

我的机器里有一些 k8s 集群,我尝试做一些学习的东西,但我现在就堆叠起来。

我有 2 个应用程序,一个是 mysql,另一个是 wordpress,它们运行良好。当我为 WordPress 提供 LoadBalancer 类型时,它会获取一个 IP,我可以在浏览器中看到。

所以我想创建一个 Ingress 并按主机名调用,但 Ingress 不采用负载均衡器 IP。我做错了什么吗?

这是我的 Ingress 配置

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: wp-ingress
  kubernetes.io/ingress.class: nginx
  labels:
    name: wp-ingress
spec:
  rules:
  - host: wordpress.pandora.local
    http:
      paths:
      - pathType: Prefix
        path: "/"
        backend:
          service:
            name: wp-svc
            port: 
              number: 80
  - host: phpmyadmin.pandora.local
    http:
      paths:
      - pathType: Prefix
        path: "/"
        backend:
          service:
            name: phpmyadmin-svc
            port: 
              number: 80
Run Code Online (Sandbox Code Playgroud)

和问题

# kg ingress
NAME         CLASS    HOSTS                                              ADDRESS   PORTS   AGE …
Run Code Online (Sandbox Code Playgroud)

kubernetes kubernetes-ingress

0
推荐指数
1
解决办法
5082
查看次数