AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / user-115857

CodeGnome's questions

Martin Hope
CodeGnome
Asked: 2014-07-31 08:22:18 +0800 CST

如何使用 Augeas 管理 MySQL 的 `!includedir` 指令?

  • 2

我有一个带有!includedir指令的 MySQL 配置文件。当镜头检查文件时,该指令似乎正确显示:

$ sudo augtool print /files/etc/my.cnf | fgrep includedir
/files/etc/my.cnf/!includedir = "/etc/mysql/conf.d/"

但是,虽然 augtool 在检查/etc/my.cnf时会打印出路径,但如果我尝试打印或检查实际节点,它会一直抱怨路径表达式无效。例如:

$ sudo augtool
augtool> print /files/etc/my.cnf/!includedir
error: Invalid path expression
error: empty name
/files/etc/my.cnf/|=|!includedir

如何使用 Augeas 1.0.0 管理/etc/my.cnf文件!includedir中的指令?

mysql
  • 2 个回答
  • 403 Views
Martin Hope
CodeGnome
Asked: 2012-08-10 06:36:00 +0800 CST

如何使用 resolvconf/dnsmasq 安装脚本解决我的依赖性问题?

  • 0

我有以下人偶模块:

class resolvconf {
    $packages = ['resolvconf', 'dnsmasq']
    package { $packages: ensure => installed, }

    file { '/etc/resolvconf/resolv.conf.d/base':
        ensure  => file,
        owner   => root,
        group   => root,
        content => '
nameserver 127.0.0.1
nameserver 8.8.8.8
nameserver 8.8.4.4',
    }

    service { 'dnsmasq':
        require   => Package[resolvconf],
        ensure    => running,
        subscribe => File['/etc/resolvconf/resolv.conf.d/base']
    }
}

但是,当我运行配置时,出现以下错误:

错误:/Stage[main]/Resolvconf/File[/etc/resolvconf/resolv.conf.d/base]/ensure:从不存在更改为文件失败:无法在确保上设置“文件:没有这样的文件或目录 - / etc/resolvconf/resolv.conf.d/base.puppettmp_4012 在/tmp/vagrant-puppet/modules-0/resolvconf/manifests/init.pp:13

我理解这意味着/etc/resolvconf/resolv.conf.d/base尚不存在,或无法创建。在多次重新配置或重新启动后,这个问题似乎最终会消失,所以它似乎是某种依赖问题,我可以使用适当的依赖或 exec 语句来解决。

此外,由于这个失败的依赖项,以下将无限期挂起:

notice: /Stage[main]/Resolvconf/Service[dnsmasq]: Dependency File[/etc/resolvconf/resolv.conf.d/base] has failures: true
warning: /Stage[main]/Resolvconf/Service[dnsmasq]: Skipping because of failed dependencies

或者至少直到我点击CTRL-C。

我需要在模块或清单中更改什么才能让脚本在第一次通过时正确运行?

dependencies
  • 1 个回答
  • 6683 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve