Quantcast
Channel: Ask Puppet: Puppet DevOps Q&A Community - RSS feed
Viewing all 6104 articles
Browse latest View live

Coyping File only if content is changed

$
0
0
Hi, i have requirement where i have to create a file but next time when my puppet cycle runs it should check that if there is any change in the file only then copy it with the timestamp. I tried many possible ways but did not find anything to compare the contents of the file. Is there any way possible to do that in puppet? Best Regards, Anu Thakur

Windows Client Management

$
0
0
Is somebody using puppet / chocolatey as replacement for SCCM? Is it possible to deferre reboots? Can i notify users before software updates? Thx Marko

puppet inheritance VS puppet composition

$
0
0
I just came cross [puppet](https://tekslate.com/puppet-training) inheritance lately. A few questions around it: 1.is it a good practice to use puppet inheritance? I've been told by some of the experienced puppet colleagues Inheritance in puppet is not very good, I was not quite convinced. 2.Coming from OO world, I really want to understand under the cover, how puppet inheritance works, how overriding works as well. Thanks in advance Johny

Why does exec fail when executing directly succeeds?

$
0
0
I'm new to writing my own manifests and this is my first question here, so any help is appreciated... I'm trying to install php 5.4 on Ubuntu 12.04 and I'm struggling to install non-authenticated packages through apt. The closest I've got to a solution is to install php5 (5.3) then add a new repository and reinstall using an exec. When I try this I get, /Stage[main]/Php/Exec[reinstall php5.4]/returns: change from notrun to 0 failed: apt-get install php5 -y --force-yes returned 100 instead of one of [0] at... The bit I don't understand is that if I then ssh into the machine and run `sudo apt-get install php5 -y --force-yes` at the command line, it runs fine. **So why can I run this command at the command line and not through puppet?** My puppet manifest: class php ($version = '5.4', $show_errors = false) { include apache2 include apt::update package { 'php5': ensure => present, notify => Service['apache2'], require => Class['apt::update'] } package { 'libapache2-mod-php5': ensure => present, require => Package['php5'] } if $show_errors { $ini_file = 'php-development' } else { $ini_file = 'php-production' } file { 'php.ini': path => '/etc/php5/apache2/php.ini', ensure => present, source => "puppet:///modules/php/${ini_file}.ini", notify => Service['apache2'], require => Package['libapache2-mod-php5'] } if $version == '5.4' { apt::repository { 'ppa:ondrej/php5': require => Package['php5'] } exec { 'reupdate apt': command => 'apt-get update', path => '/usr/bin', require => Apt::Repository['ppa:ondrej/php5'] } exec { 'reinstall php5.4': command => 'apt-get install php5 -y --force-yes', path => '/usr/bin', require => Exec['reupdate apt'], before => File['php.ini'] } } }

returned 100 instead of one of [0]

$
0
0
Hi, While i am running puppet i am getting the following error err: /Stage[main]/applicationsetup/Exec[pacakge-name]/returns: change from notrun to 0 failed: sudo apt-get -y --allow-unauthenticated --force-yes install returned 100 instead of one of [0] at /etc/puppet/manifests/classes/applicationsetup.pp:10 My puppet config class applicationsetup { exec { "package-install": command => "sudo apt-get -y --allow-unauthenticated --force-yes install ", path => "/usr/bin", path => ['/usr/bin', '/bin', '/sbin'], logoutput => true, tries => 3, timeout => 3000, } }

puppet agent without pe-puppet possible?

$
0
0
Hi all, I would like to know if there is a possibility to change the default username "pe-puppet" for the agent to something shorter ? Kind Regards, Marcel

How to create a class that only refresh

$
0
0
It is possible to create a class that only executes when receives a notification event? I want to do exactly what exec does with "refreshonly", I could not find how to do this. Specifically, what I want to do is: I have an archive resource, that downloads a file, with a "create" attribute: archive { "/opt/service/service-${version}.jar": source => "http://[ARTIFACT_URL]/service-${version}.jar", creates => "/opt/service/service-${version}.jar", cleanup => false, } I would like to do this: Archive["/opt/service/service-${version}.jar"] ~> Some_custom_class['some_title'] But "Some_custom_class" can only execute when the archive downloads the file, that is when a notification event is triggered. Thanks!

Can augeas resource edit a file outside the recognized path ?

$
0
0
Hi, I need to add lines in the .ssh/config file of a specific user. I choose to use augeas to do so, because, in reality, it is a collection of various exported resources. So basicaly : augeas{"ssh_config_deployer_local": context => '/files/deployer/.ssh/config', changes => [ "set host ${hostname}", "set user deploy" ], } Turns out this won't work, because augeas does not manage this path (/deployer/.ssh/config). So I tried it another way around : augeas{"ssh_config_deployer_local": context => '/files', incl => '/deployer/.ssh/config', lens => 'Ssh.lns', changes => [ "set host ${hostname}", "set user deploy" ], } withou success. How can I tell the augeas resource to edit this file with the Ssh lens ?

PE external SSL cert for console

$
0
0
Hello, I was going through the documentation to install a custom cert for the console. I completed the steps and the parameters are showing the enw cert but the web UI is still displaying the old cert. The agents runs every 30 minutes and I also tried restarting the puppet services with no luck. Does anyone have any recommendations? https://puppet.com/docs/pe/2017.3/ssl_and_certificates/use_a_custom_ssl_cert_for_the_console.html

PE console SSL cert renewal

$
0
0
Hello, The certificate for the PE console is about to expire. I followed the steps in the below document but updated the name. After performing the steps the server was still using the old certificate even though it was pointed at the new names. I tried restarting the puppet.server as well as the console and ngix services but it still is pointing at the old cert. After updating the new cert names to the previous names the new cert was updated There is apparently other areas where adjustments need to be made for updating the cert name. Anyone know where those locations are or documentation about this? https://puppet.com/docs/pe/2017.3/ssl_and_certificates/use_a_custom_ssl_cert_for_the_console.html

Windows Support Phone Number

$
0
0
[Windows support phone number](http://www.microsoftoutlookoffice365.com/window-outlook-support.html), Microsoft Windows is a meta family of graphical operating system used to manage computer hardware and software and provide services for computer system. Many of user does not know exactly about operating system for them we have a web page. Now we are going to talk about issues and problem that are exactly generate in operating system. Microsoft windows user faces many issue windows 10 with office like need help with licensing or product activation, printing issue after upgrading to Windows 10, up gradation issue with windows 10 on new device that include office 365, Issue with find Office applications after Windows 10 upgrade, Problems with Program Compatibility, System Restore Stops Working, Rebooting after Blue Screen, Startup Programs are Blocked and other windows issues. We provide technical guidance and windows support number +1- 800-826-8068 for windows resolution. Our Other Related Service- [Microsoft Office Support Number](http://www.microsoftoutlookoffice365.com/outlook-365-support.html)

Learning VM question - do I need port forwarding?

$
0
0
Hi, I am trying to run the puppet learning vm, so I started with Ubuntu 16.2 and installed virtualBox. I pulled down the LearningVM and with Vagrant created the image. I am able to launch the puppet learning vm within VirtualBox. I am able to log in ok. I get the # prompt, and the screen indicates to navigate to http://10.0.2.15 I used my browser, outside of Virtual Box but it just spins on that address. Do I need to open a port up for this? What is my next step please? Thanks, CF

crayfishx/firewalld add forward port

$
0
0
I can add http & https services as below: My manifest: [root@puppet profile]# cat manifests/firewalld.pp class profile::firewalld { class {'::firewalld': } } [root@puppet profile]# My hiera data: [root@puppet test]# cat data/groups/rubydev-test.yaml --- # firewall services http & https firewalld::services: 'Allow HTTP from public zone': ensure: present service: http zone: public 'Allow HTTPS from public zone': ensure: present service: https zone: public [root@puppet test]# But failed to find a way to add forward port. I need to forward 80/tcp to 4567/tcp on same host. Can you please advise how I can merge the forward port rule into my current settings? Thank you!

Activity Ideas And Strategies For Anyone To Use

$
0
0
Using a hobby may minimize tension and enhance your life span, due to productive engagement of your respective human brain cells, muscle groups and bones. Locating the best interest is easier than you believe. Just concentrate on the stuff you in a natural way love to do, and read some pointers on this page regarding how involve oneself from the hobby of your choice.

To help you remain stress-free of charge consume a hobby. Interests offer you a way to get away from the day-to-day grind and enjoy your self. When you don't use a hobby, take into account the things you enjoy doing. If you beloved this article and you would like to obtain a lot more data about set alarm reminder kindly go to our web-page. Will you take pleasure in art? If so, go on a piece of art class or a sculpting course to understand a fresh hobby.

Carpentry is a good pastime to take up. Carpentry abilities allow you to make furnishings or exterior design to add charm to your own home. Carpentry assignments can be simple things like constructing a birdhouse or something that is as difficult like a new dresser. Both men and women appreciate utilizing wood.

Prior to deciding to transform your activity into a company, perform arithmetic. Quote exactly how much you will need as commence-up investment capital, doing work investment capital along with the quantity you have got to carry on in the beginning before the organization takes off. This provides you with an excellent budget and you may be protected economically before you start.

If you are considering turning your pastime into your enterprise, then you have got to think of a name for that enterprise. Establish your brand with the outstanding business name. This label should be distinctive, have to do with this business or merchandise you are going to provide, and, naturally, be an issue that people will effortlessly remember.

When you don't learn how to start making money with your hobby, begin by choosing a market. Do you possess particular skills other individuals don't? Hunt for routines that other might not take pleasure in, but which you do. This provides you with a good start.

A fun interest that a lot of people may well take pleasure in is celeb chit chat. Celebrities usually often engaging in love quarrels and spats therefore we just try to eat all this up. You can find periodicals focused on this and also weblogs and internet sites as well. In order to make the obsession in a whole blown pastime in order to.

Are you looking for a pastime to load your time and energy and would like to get fit? Swimming may be a possibility that you can consider. It may cost a bit every month to pay account charges to the pool area, but some people find great pleasure in going swimming laps each day. The benefits are great therefore is the potential for picking up an entertaining interest that you appreciate.

Pick a activity that fits your all-natural talents. For people with a continuous hands along with a very good eye, golf could possibly be the excellent activity for you. If you are excellent along with your hands, take into account needlework, hardwood doing work or pottery. Be sure that the hobby you select matches your budget which is calming for you.

Angling is amongst the best outdoor hobbies for individuals of any age. The youngest youngsters for the oldest seniors could possibly get out and savor a day with the lake. It just takes just a little gear and a lot of patience as you may wait for seafood to chew. It really is a comforting pastime which everybody could enjoy.

If you are living close to the beach, snorkeling can be quite a interest that you should think about discovering. You get to investigate a whole other world by merely falling below the surface of the normal water. The equipment is pretty affordable along with the courses are simple to find, so just go and get started exploring the coral reefs along with the sea food listed below.

Grab that older guitar and study a number of chords. You don't need to become the following Eric Clapton, however, you could certainly reap the benefits of learning about an instrument. Acoustic guitar enjoying is a relaxing interest and it gives you the opportunity to express your feelings if you want to.

Get together with your mommy to experience a great hobby. Consider getting started with a cooking type you both take pleasure in. You absolutely not need to be excellent cooks food to have anything out of such a class. Going for a preparing food type with each other gives you the chance to contend as well as to work. Search the web or check around to find a cooking food class in your area.

With this write-up read through, you know up to you can about pastimes. Cautiously select your pastime. What you do in your spare time is really a representation of a person you happen to be. Pick pastimes which reflect your morals and beliefs.

Error: Alternate path /usr/bin/g++-5 does not exist

$
0
0
After creating a jail (amd64) through debootstrap, I am using update-alternatives to install g++-5 but it is throwing back this error in the log. I am running this command through shell script and also have tried directly through puppet, still the error was same. **myshellscript.sh** chroot $target_amd64/ update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.7 10 chroot $target_amd64/ update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 10 chroot $target_amd64/ update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.7 10 chroot $target_amd64/ update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-5 20 chroot $target_amd64/ update-alternatives --install /usr/bin/cc cc /usr/bin/gcc 30 chroot $target_amd64/ update-alternatives --set cc /usr/bin/gcc chroot $target_amd64/ update-alternatives --install /usr/bin/c++ c++ /usr/bin/g++ 30 chroot $target_amd64/ update-alternatives --set c++ /usr/bin/g++ **init.pp** exec { 'execute_script': command => 'sh /usr/share/puppet/modules/amd64_jail/files/myshellscript.sh', path => ['/usr/sbin/','/usr/bin/','/bin/','/sbin'], timeout => 50000, } It is installing correctly for gcc-4.7, g++4.7, gcc-5 but not for g++-5. While, if I run this command manually on my Virtual Machine (Ubuntu 16.04), it gives no error.

Give a minimum size of swap area through lvm method

$
0
0
While building Ubuntu_16.04 image through packer, I have to do **partitioning in preseed file** such that the method used is *LVM* and the minimum size of swap area must be 2GB. Currently, the *VM is giving the swap area same as the size of the RAM* given as input. If RAM is 1GB , the swap area created by default is also 1GB. This I have to change and put it **minimum to 2GB.** **Current preseed file -** d-i partman-auto/method string lvm d-i partman-lvm/device_remove_lvm boolean true d-i partman-lvm/confirm boolean true d-i partman-lvm/confirm_nooverwrite boolean true d-i partman-auto/expert_recipe string \ boot-root :: \ 512 50 1024 ext3 \ $primary{ } $bootable{ } \ method{ format } format{ } \ use_filesystem{ } filesystem{ ext3 } \ mountpoint{ /boot } \ . \ 50000 10000 1000000000 ext3 \ lv_name{ root } \ method{ lvm } format{ } \ use_filesystem{ } filesystem{ ext4 } \ mountpoint{ / } \ $lvmok{ } \ . \ 2148 512 200% linux-swap \ lv_name{ swap } \ method{ swap } format{ } \ $lvmok \ . d-i partman-partitioning/confirm_write_new_label boolean true d-i partman/choose_partition select finish d-i partman/confirm boolean true d-i partman/confirm_nooverwrite boolean true This code is not working to restrict swap size to minimum of 2GB.

How to create users with hiera 5?

$
0
0
I'm new to Hiera and would like to manage users on ubuntu, especially passwords and ssh keys with hiera. I can't find any specific documentation anywhere and wondering what would be the best practice method.

2017.2 Include Chocolatey requires reboot?

$
0
0
Hello, I’m doing a POC with puppet. I used the Supported module for Chocolatey to install Chocolatey on Windows 2012 and I was not able to run any choco commands until I manually rebooted the server. Is this normal? I was under the impression that installing Chocolatey with Puppet would not require a reboot. I used “include chocolatey” – I’m new to Puppet – thanks much for any help

How should I structure my hiera for systemd limits?

$
0
0
I am trying to use https://github.com/camptocamp/puppet-systemd. I want to setup some systemd limits for a service so I have included ... include ::systemd ... in my manifest. And I have this hiera data: systemd::service_limits: 'openstack-nova-compute.service': limits: LimitNOFILE: 32768 But when puppet on my node I get this error: Error while evaluating a Function Call, Class[Systemd]: parameter 'service_limits' unrecognized key 'openstack-nova-compute.service' at ... I have looked at the docs and they do not explain how to form the hash in hiera, they just give this example: ::systemd::service_limits { 'foo.service': limits => { 'LimitNOFILE' => 8192, 'LimitNPROC' => 16384, } } So how would I do that in hiera/yaml?

2017.2 Include Chocolatey requires reboot?

$
0
0
Hello, I’m doing a POC with puppet. I used the Supported module for Chocolatey to install Chocolatey on Windows 2012 and I was not able to run any choco commands until I manually rebooted the server. Is this normal? I was under the impression that installing Chocolatey with Puppet would not require a reboot. I used “include chocolatey” – I’m new to Puppet – thanks much for any help
Viewing all 6104 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>