Authconfigは/etc/sysconfig/authconfigファイルを再構築し続け、Puppet操作を混乱させます。

Authconfigは/etc/sysconfig/authconfigファイルを再構築し続け、Puppet操作を混乱させます。

私は私のPuppet環境でこのLDAPモジュールを長い間使用してきました。このモジュールは、次のファイルを RHEL サーバーにアップロードします。

/etc/openldap/openldap.conf
/etc/pam_ldap.conf
/etc/nsswitch.conf
/etc/sssd/sssd.conf
/etc/sysconfig/authconfig
/etc/sudo-ldap.conf
/etc/openldap/cacerts/cacert.pem

このコマンドを実行すると実行され、authconfig --updateallLDAP が動作を開始します。これは私たちが持っているRH6.2サーバーではうまく機能しますが、RH6.4では問題があり、唯一の違いは追加ですFORCELEGACY=YES line

この行動についてどうすればよいですか?論理的なのは、/etc/sysconfig/authconfig/sbin/authconfig 生成されたファイルを Puppetmaster にアップロードしているようですが、再作成し続け、/etc/sysconfig/authconfigすべての操作が順序を変更します。

[root@rhel-server ~]# puppet agent --test
Info: Retrieving plugin
Info: Loading facts in /var/lib/puppet/lib/facter/extra_info.rb
Info: Caching catalog for rhel-server.domain.local
Info: Applying configuration version '1379669638'
Notice: /File[/etc/sysconfig/authconfig]/content: 
--- /etc/sysconfig/authconfig   2013-09-20 13:18:24.165303819 +0200
+++ /tmp/puppet-file20130920-17419-lgtzfu-0 2013-09-20 13:44:05.388741384 +0200
@@ -5,22 +5,22 @@
 USESSSDAUTH=no
 USESHADOW=yes
 USEWINBIND=no
+USESSSD=no
 USEDB=no
 FORCELEGACY=yes
 USEFPRINTD=yes
-USEHESIOD=no
 FORCESMARTCARD=no
-PASSWDALGORITHM=md5
 USELDAPAUTH=yes
+USEPASSWDQC=no
 IPAV2NONTP=no
-USELDAP=yes
+USELOCAUTHORIZE=yes
 USECRACKLIB=yes
 USEIPAV2=no
 USEWINBINDAUTH=no
 USESMARTCARD=no
-USELOCAUTHORIZE=yes
+USELDAP=yes
 USENIS=no
 USEKERBEROS=no
 USESYSNETAUTH=no
-USESSSD=no
-USEPASSWDQC=no
+PASSWDALGORITHM=md5
+USEHESIOD=no

Info: FileBucket got a duplicate file {md5}b8bd9dc8120ab4be6b41ac5bb57e1192
Info: /File[/etc/sysconfig/authconfig]: Filebucketed /etc/sysconfig/authconfig to puppet with sum b8bd9dc8120ab4be6b41ac5bb57e1192
Notice: /File[/etc/sysconfig/authconfig]/content: content changed '{md5}b8bd9dc8120ab4be6b41ac5bb57e1192' to '{md5}f1cf038ce9c007f9eefe3b83fb674584'
Info: /File[/etc/sysconfig/authconfig]: Scheduling refresh of Exec[/usr/sbin/authconfig --updateall]
Notice: /Stage[main]/Ldap/Exec[/usr/sbin/authconfig --updateall]: Triggered 'refresh' from 1 events
Notice: Finished catalog run in 6.17 seconds
[root@rhel-server ~]# 

したがって、Puppetmasterのauthconfigファイルの順序にかかわらず、authconfigが再構築を続けるようです。これが本質的に意味するのは、Puppetが実行されるたびに(30分)、Puppetがファイルを置き換えてから、authconfigがファイルの順序を変更することです。

この問題をどのように解決できますか?

ベストアンサー1

Puppetは本質的に実行順序を保証しません。この設定を変更する必要がある場合は、beforeまたはrequireステートメントを使用してください。

file {'foo':
  ensure => present,
}

file {'bar':
  ensure => present, 
  require => File['foo'],
}

http://docs.puppetlabs.com/learning/ordering.html

おすすめ記事