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-138141

Sharuzzaman Ahmat Raslan's questions

Martin Hope
Sharuzzaman Ahmat Raslan
Asked: 2016-07-21 10:41:04 +0800 CST

ansible:根据ansible_os_family设置变量

  • 3

使用 ansible 2.0.2.0,我想将文件部署到目标服务器。Debian 和 RedHat 系列的目标文件夹不同。

我使用了 set_fact,但似乎它使用了最后定义的,忽略了 when: 选项。

我不想使用变量文件,因为这个变量只在这个特定的剧本中使用

将复制任务复制到 RedHat 和 Debian 中虽然可能,但将来会使维护变得复杂。

下面的剧本在针对 Ubuntu 服务器执行时将失败,因为目标已扩展为 /etc/nrpe.d 用于 RedHat

- set_fact:
  destination: "/etc/nagios/nrpe.d/"
  when: ansible_os_family == "Debian"

- set_fact:
  destination: "/etc/nrpe.d/"
  when: ansible_os_family == "RedHat"

- name: Ensure Nagios custom checks directory exists
  file: path=/usr/local/lib/nagios/plugins state=directory mode=0755

- name: Install check_cpu_steal
  copy: src=eprepo/sysadmin/nagios_checks/check_cpu_steal dest=/usr/local/lib/nagios/plugins/check_cpu_steal mode=0755 owner=root group=root

- name: Install check_cpu_steal command to /etc/nrpe.d
  copy: src=eprepo/sysadmin/files/check_cpu_steal.conf dest="{{ destination }}/check_cpu_steal.conf mode=0644 owner=root group=root"
ubuntu redhat ansible
  • 1 个回答
  • 4901 Views
Martin Hope
Sharuzzaman Ahmat Raslan
Asked: 2015-03-18 00:43:19 +0800 CST

如何从命令行监控 MariaDB Galera 集群状态

  • 2

我知道要检查 Galera 集群状态,登录 mysql 客户端后应该使用的命令是:

SHOW STATUS LIKE 'wsrep%';

但是,如何直接从命令行获取输出?

下面的命令导致错误:

[root@mariadb01 ~]# mysql -u root -p "SHOW STATUS LIKE 'wsrep%';"
Enter password:
ERROR 1049 (42000): Unknown database 'SHOW STATUS LIKE 'wsrep%';'

我计划使用 cron 和 bash 创建一个简单的监控,因此需要使用命令行获取输出

mysql
  • 1 个回答
  • 27037 Views
Martin Hope
Sharuzzaman Ahmat Raslan
Asked: 2014-10-17 01:52:29 +0800 CST

将软件包转换为 EPEL 版本

  • 1

我之前从 centos 5 测试中安装了 backuppc 3.1.0。该软件包现在不再由 centos 维护。

EPEL有BackupPC版本3.3.0,但是yum check-update没有提示这个包是centos替代backuppc包

如何将 backuppc centos 转换为 BackupPC EPEL?

我不打算重新安装,因为这台机器已经完成了很多配置才能达到它的状态。

任何想法?

谢谢

[root@backup yum.repos.d]# yum info backuppc
Loaded plugins: downloadonly
Installed Packages
Name       : backuppc
Arch       : i386
Version    : 3.1.0
Release    : 1.el5.centos
Size       : 2.5 M
Repo       : installed
Summary    : BackupPC is a high-performance, enterprise-grade system for backing up Unix, Linux
License    : GPL
Description: BackupPC is a high-performance, enterprise-grade system
           : for backing up Linux, Win32, and laptops to a server's disk.
           : Features include clever pooling of identical files, no client-side
           : software, and a powerful Apache/CGI user interface.

Available Packages
Name       : BackupPC
Arch       : i386
Version    : 3.3.0
Release    : 2.el5
Size       : 666 k
Repo       : epel
Summary    : High-performance backup system
URL        : http://backuppc.sourceforge.net/
License    : GPLv2+
Description: BackupPC is a high-performance, enterprise-grade system for backing up Linux
           : and WinXX and Mac OS X PCs and laptops to a server's disk. BackupPC is highly
           : configurable and easy to install and maintain.
centos
  • 1 个回答
  • 230 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