@@ -107,6 +107,46 @@ bundle agent ignore_interfaces_rx_reccomendations
107107}
108108@endif
109109
110+ bundle agent nfs_mount_recommendations
111+ # @brief Recommendations about configured NFS servers
112+ {
113+ meta:
114+
115+ "tags" slist => { "cfengine_recommends" };
116+
117+ vars:
118+ "nfs_server_list"
119+ slist => getvalues( "default:inventory_linux.nfs_server"),
120+ depends_on => { "cfe_internal_inventory_mounted_nfs_server" };
121+
122+ classes:
123+
124+ # If we end up emitting the recommendation, then we define a class so that
125+ # instructions about disabling these reports are also emitted.
126+
127+ "cfengine_recommendation_instruct_disablement"
128+ expression => "cfengine_recommendation_emitted_kept",
129+ scope => "namespace";
130+
131+ reports:
132+
133+ "$(with)"
134+ with => concat(
135+ "NOTICE: At least one of your NFS servers is specified",
136+ " in-consistently. Consider aligning your definitions to",
137+ " consistently use or avoid a trailing dot when specifying",
138+ " the NFS server."
139+ ),
140+ if => and(
141+ # Check if there exists inventory of mounted nfs servers
142+ isvariable( "nfs_server_list" ),
143+ # Check if any other NFS server looks identical when adding a trailing dot
144+ some( concat( escape("$(nfs_server_list)"), "\.$" ),
145+ "nfs_server_list" )
146+ ),
147+ classes => results( "bundle", "cfengine_recommendation_emitted");
148+ }
149+
110150bundle agent postgresql_conf_recommendations
111151# @brief Recommendations about the configuration of postgresql.conf for CFEngine Enterprise Hubs
112152{
0 commit comments