Skip to content

Commit 0e1ec57

Browse files
committed
Merge branch 'main' into asenci/instances-hash
2 parents 76a7c3f + 0070680 commit 0e1ec57

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+83
-54
lines changed

environments/etc/manifests/site.pp

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,25 @@
11
node default {
2+
23
class { 'datadog_agent':
3-
api_key => 'somenonnullapikeythats32charlong',
4+
api_key => 'somenonnullapikeythats32charlong',
5+
agent_extra_options => {
6+
use_http => true,
7+
},
8+
facts_to_tags => ['osfamily'],
9+
integrations => {
10+
'ntp' => {
11+
init_config => {},
12+
instances => [{
13+
offset_threshold => 30,
14+
}],
15+
},
16+
},
417
}
18+
19+
class { 'datadog_agent::integrations::apache':
20+
url => 'http://example.com/server-status?auto',
21+
username => 'status',
22+
password => 'hunter1',
23+
}
24+
525
}

kitchen.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ platforms:
2828
- mkdir /home/kitchen/puppet
2929
- printf <%= File.read('environments/etc/Puppetfile').inspect %> > /home/kitchen/puppet/Puppetfile
3030

31+
- gem install bundler -v '= 1.17.3'
3132
- gem install r10k -v 2.6.7
3233
- cd /home/kitchen/puppet && r10k puppetfile install --moduledir=/tmp/modules
3334

@@ -45,6 +46,7 @@ platforms:
4546
- mkdir /home/kitchen/puppet
4647
- printf <%= File.read('environments/etc/Puppetfile').inspect %> > /home/kitchen/puppet/Puppetfile
4748

49+
- gem install bundler -v '= 1.17.3'
4850
- gem install r10k -v 2.6.7
4951
- cd /home/kitchen/puppet && r10k puppetfile install --moduledir=/tmp/modules
5052

@@ -64,6 +66,7 @@ platforms:
6466
- mkdir /home/kitchen/puppet
6567
- printf <%= File.read('environments/etc/Puppetfile').inspect %> > /home/kitchen/puppet/Puppetfile
6668

69+
- gem install bundler -v '= 1.17.3'
6770
- gem install r10k -v 2.6.7
6871
- cd /home/kitchen/puppet && r10k puppetfile install --moduledir=/tmp/modules
6972

@@ -81,7 +84,8 @@ platforms:
8184
provision_command:
8285
- zypper ar -G https://yum.puppet.com/puppet/sles/15/x86_64/ puppet-repo
8386
- zypper install -y puppet-agent ruby=2.5
84-
- gem install bundler serverspec rspec
87+
- gem install bundler -v '= 1.17.3'
88+
- gem install serverspec rspec
8589
- ln -s /usr/bin/rspec.ruby2.5 /usr/bin/rspec
8690
- ln -s /opt/puppetlabs/puppet/bin/puppet /usr/bin/puppet
8791
- mkdir /home/kitchen/puppet

manifests/install_integration.pp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
Boolean $third_party = false,
66
){
77

8-
include datadog_agent
8+
require ::datadog_agent
99

1010
if $ensure == 'present' {
1111

manifests/integration.pp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@
77
Enum['present', 'absent'] $ensure = 'present',
88
){
99

10-
include datadog_agent
10+
# We can't `require ::datadog_agent` from here since this class is used by the
11+
# datadog_agent class, causing a dependency cycle. If using this class
12+
# directly, you should define datadog_agent before datadog_agent::integration.
1113

1214
if $::datadog_agent::_agent_major_version > 5 {
1315
$dst_dir = "${datadog_agent::params::conf_dir}/${integration}.d"

manifests/integrations/activemq_xml.pp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
Optional[Array[String]] $detailed_subscribers = [],
5353
Optional[Array] $instances = undef,
5454
) inherits datadog_agent::params {
55-
include datadog_agent
55+
require ::datadog_agent
5656

5757
$legacy_dst = "${datadog_agent::params::legacy_conf_dir}/activemq_xml.yaml"
5858
if $::datadog_agent::_agent_major_version > 5 {

manifests/integrations/apache.pp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
Optional[Array] $instances = undef,
3737
Optional[Array] $logs = undef,
3838
) inherits datadog_agent::params {
39-
include datadog_agent
39+
require ::datadog_agent
4040

4141
if !$instances {
4242
$_instances = datadog_agent::clean_empty([{

manifests/integrations/cacti.pp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
$mysql_password = undef,
1919
$rrd_path = '/var/lib/cacti/rra/',
2020
) inherits datadog_agent::params {
21-
include datadog_agent
21+
require ::datadog_agent
2222

2323
$legacy_dst = "${datadog_agent::params::legacy_conf_dir}/cacti.yaml"
2424
if $::datadog_agent::_agent_major_version > 5 {

manifests/integrations/ceph.pp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
Array $tags = [ 'name:ceph_cluster' ],
1818
String $ceph_cmd = '/usr/bin/ceph',
1919
) inherits datadog_agent::params {
20-
include datadog_agent
20+
require ::datadog_agent
2121

2222
file { '/etc/sudoers.d/datadog_ceph':
2323
content => "# This file is required for dd ceph \ndd-agent ALL=(ALL) NOPASSWD:/usr/bin/ceph\n"

manifests/integrations/consul.pp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
Boolean $new_leader_checks = true,
3434
Optional[Array] $service_whitelist = []
3535
) inherits datadog_agent::params {
36-
include datadog_agent
36+
require ::datadog_agent
3737

3838
$legacy_dst = "${datadog_agent::params::legacy_conf_dir}/consul.yaml"
3939
if $::datadog_agent::_agent_major_version > 5 {

manifests/integrations/directory.pp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
String $pattern = '',
6666
Optional[Array] $instances = undef,
6767
) inherits datadog_agent::params {
68-
include datadog_agent
68+
require ::datadog_agent
6969

7070
if !$instances and $directory == '' {
7171
fail('bad directory argument and no instances hash provided')

0 commit comments

Comments
 (0)