File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -37,5 +37,4 @@ We can edit the manifest and run `vagrant up --provision` to upload the new vers
3737
3838# Test
3939
40- In the CentOS VM, run ` sudo /usr/local/bin/puppet apply --modulepath=./modules ./manifests/site.pp ` in ` /home/vagrant/puppet ` to apply to manifest on the VM.
41- In the Ubuntu VM, run ` sudo /opt/puppetlabs/bin/puppet apply --modulepath=./modules ./manifests/site.pp ` in ` /home/vagrant/puppet ` to apply to manifest on the VM.
40+ In a VM, run ` sudo puppet apply --modulepath=./modules ./manifests/site.pp ` in ` /home/vagrant/puppet ` to apply to manifest on the VM.
Original file line number Diff line number Diff line change 11Vagrant . configure ( "2" ) do |config |
22 config . vm . box = "generic/centos7"
3- config . vm . provision "file" , source : "../../../environments/etc" , destination : "$HOME/puppet"
3+ config . vm . provision "file" , source : "../../environments/etc" , destination : "$HOME/puppet"
4+ config . vm . synced_folder "../../" , "/puppet-datadog-agent"
45 config . vm . provision "shell" , inline : <<-SHELL
5- rpm -ivh http://yum.puppetlabs.com/puppetlabs-release-el-7.noarch.rpm
6+ #install puppet 5
7+ rpm -ivh http://yum.puppetlabs.com/puppet5-release-el-7.noarch.rpm
68 yum install -y puppet
7- systemctl start puppet
8- systemctl enable puppet
9+ ln -s /opt/puppetlabs/puppet/bin/puppet /usr/bin/puppet
910
10- gem install r10k -v 2.6.7
11+ # install modules
1112 cd /home/vagrant/puppet
12- sudo su vagrant -c "/usr/local/bin/r10k puppetfile install --moduledir=/tmp/modules"
13+ /opt/puppetlabs/puppet/bin/gem install r10k -v 2.6.7
14+ /opt/puppetlabs/puppet/bin/r10k puppetfile install --moduledir=/home/vagrant/puppet/modules
15+
16+ # link local module
17+ ln -s /puppet-datadog-agent /home/vagrant/puppet/modules/datadog_agent
1318 SHELL
1419end
Original file line number Diff line number Diff line change 11Vagrant . configure ( "2" ) do |config |
22 config . vm . box = "generic/centos8"
3- config . vm . provision "file" , source : "../../../environments/etc" , destination : "$HOME/puppet"
3+ config . vm . provision "file" , source : "../../environments/etc" , destination : "$HOME/puppet"
4+ config . vm . synced_folder "../../" , "/puppet-datadog-agent"
45 config . vm . provision "shell" , inline : <<-SHELL
6+ #install puppet 6
57 dnf install -y https://yum.puppetlabs.com/puppet-release-el-8.noarch.rpm
68 dnf install -y puppet
7- systemctl start puppet
8- systemctl enable puppet
9+ ln -s /opt/puppetlabs/puppet/bin/puppet /usr/bin/puppet
910
10- /opt/puppetlabs/puppet/bin/gem install r10k -v 2.6.7
11+ # install modules
1112 cd /home/vagrant/puppet
12- sudo su vagrant -c "/opt/puppetlabs/puppet/bin/r10k puppetfile install --moduledir=/tmp/modules"
13+ /opt/puppetlabs/puppet/bin/gem install r10k -v 2.6.7
14+ /opt/puppetlabs/puppet/bin/r10k puppetfile install --moduledir=/home/vagrant/puppet/modules
15+
16+ # link local module
17+ ln -s /puppet-datadog-agent /home/vagrant/puppet/modules/datadog_agent
1318 SHELL
1419end
Original file line number Diff line number Diff line change 1+ # Track control branch and fall-back to master if no matching branch.
2+ mod 'datadog_agent' , :local => true
13mod 'puppetlabs-apt' , '2.4.0'
24mod 'puppetlabs-concat' , '4.0.0'
35mod 'puppetlabs-puppetserver_gem' , '1.0.0'
Original file line number Diff line number Diff line change 11Vagrant . configure ( "2" ) do |config |
22 config . vm . box = "puppetlabs/ubuntu-16.04-64-puppet"
33 config . vm . box_version = "1.0.0"
4- config . vm . provision "file" , source : "../../../environments/etc" , destination : "$HOME/puppet"
4+ config . vm . provision "file" , source : "../../environments/etc" , destination : "$HOME/puppet"
5+ config . vm . synced_folder "../../" , "/puppet-datadog-agent"
56 config . vm . provision "shell" , inline : <<-SHELL
6- /opt/puppetlabs/puppet/bin/gem install r10k -v 2.6.7
7+
8+ #install puppet 4
9+ ln -s /opt/puppetlabs/puppet/bin/puppet /usr/bin/puppet
10+
11+ # install modules
712 cd /home/vagrant/puppet
8- su vagrant -c "/opt/puppetlabs/puppet/bin/r10k puppetfile install --moduledir=/tmp/modules"
13+ /opt/puppetlabs/puppet/bin/gem install r10k -v 2.6.7
14+ /opt/puppetlabs/puppet/bin/r10k puppetfile install --moduledir=/home/vagrant/puppet/modules
15+
16+ # link local module
17+ ln -s /puppet-datadog-agent /home/vagrant/puppet/modules/datadog_agent
918 SHELL
1019end
You can’t perform that action at this time.
0 commit comments