Thank you for the input Arnau,
That was good suggestions.

Since we were bound by the meta data returned from the webserver we chose 
to do it slightly different.
Instead we created a local vsts repo, cloned the Azure/WaLinuxAgent and 
next we will set up a task to sync to that repo every so often. This ensure 
we are up to date and meta data will be created on our puppet masters.

If/when etag is supported in file resource then i will tear this process 
down but for now this was the way we went.

Thank you for you help.

On Friday, June 1, 2018 at 7:58:37 AM UTC-5, Arnau wrote:
>
> Hi,
>
> Looks like you're not the only one having such issue: 
> https://tickets.puppetlabs.com/browse/PUP-6624 
>
>
> A workaround is to force md5 checksumming:
>
> With apache, set ContentDigest On 
> <https://httpd.apache.org/docs/2.4/de/mod/core.html#contentdigest> and 
> use:
>
> puppet apply -e 'file { "/tmp/foo": source => "http://localhost/bar";, 
> checksum => md5 }'
>
>
>
> unfortunately I don't think you can modify the webserver confgiuration in 
> githubusercontent.com.
>
> Maybe adding an extra step where you do wget first, then file -> source => 
> file:///my_path then the other exec? 
>
> something like: (I've not tested the code, only giving the idea):
>
>
> ----
> exec {'get_file':
>   command => 'wget  
> https://raw.githubusercontent.com/Azure/WALinuxAgent/master/config/66-azure-storage.rules
> '
>   cwd => 'tmp',
> }
>
>  file { 'azure_udev_rule':
>             path   => '/etc/udev/rules.d/66-azure-storage.rules',
>             ensure => 'file',
>             require => Exec['get_file],            
>             source => '/tmp/ 66-azure-storage.rules ',
>             notify => Exec['azure_udev_reload'],
>         }
>
>         exec { 'azure_udev_reload':
>             command     => 'udevadm control --reload-rules && udevadm 
> trigger --subsystem-match=block',
>             path        => ['/usr/sbin', '/usr/bin'],
>             refreshonly => true,
>         }
> ----
>
> for content hosted in a git repository I use the vcsrepo puppet module 
> https://forge.puppet.com/puppetlabs/vcsrepo.
>
> HTH,
> Arnau
>
>
> 2018-06-01 2:22 GMT+02:00 Jason McMahan <jason.m...@gmail.com 
> <javascript:>>:
>
>> Good day,
>> I am using the file resource to check if a file has changed or altered on 
>> github.
>> the code i am using is
>>
>>         file { 'azure_udev_rule':
>>             path   => '/etc/udev/rules.d/66-azure-storage.rules',
>>             ensure => 'file',
>>             source => '
>> https://raw.githubusercontent.com/Azure/WALinuxAgent/master/config/66-azure-storage.rules
>> ',
>>             notify => Exec['azure_udev_reload'],
>>         }
>>
>>         exec { 'azure_udev_reload':
>>             command     => 'udevadm control --reload-rules && udevadm 
>> trigger --subsystem-match=block',
>>             path        => ['/usr/sbin', '/usr/bin'],
>>             refreshonly => true,
>>         }
>>
>> The problem i have is every puppet run it sees the content as changed.
>> Notice: /Stage[main]/Profile::Azure/File[azure_udev_rule]/content:
>>
>> Info: Computing checksum on file /etc/udev/rules.d/66-azure-storage.rules
>> Info: /Stage[main]/Profile::Azure/File[azure_udev_rule]: Filebucketed 
>> /etc/udev/rules.d/66-azure-storage.rules to puppet with sum 
>> b775eb19522b919062b1e4aaff4c018e
>> Debug: HTTP GET request to 
>> https://raw.githubusercontent.com/Azure/WALinuxAgent/master/config/66-azure-storage.rules
>>  
>> returned 200 OK
>> Notice: /Stage[main]/Profile::Azure/File[azure_udev_rule]/content: 
>> content changed '{mtime}2018-05-31 16:28:31 -0500' to '{mtime}2018-05-31 
>> 16:31:11 -0500'
>> Info: /Stage[main]/Profile::Azure/File[azure_udev_rule]: Scheduling 
>> refresh of Exec[azure_udev_reload]
>> Debug: /Stage[main]/Profile::Azure/File[azure_udev_rule]: The container 
>> Class[Profile::Azure] will propagate my refresh event
>> Debug: Exec[azure_udev_reload](provider=posix): Executing 'udevadm 
>> control --reload-rules && udevadm trigger --subsystem-match=block'
>> Debug: Executing: 'udevadm control --reload-rules && udevadm trigger 
>> --subsystem-match=block'
>> Notice: /Stage[main]/Profile::Azure/Exec[azure_udev_reload]: Triggered 
>> 'refresh' from 1 events
>>
>>
>> Is this a bug, am i doing something wrong?
>>
>> Any help or suggestions would be greatly appreciated.
>>
>> I tried using checksum => mtime and ctime but that did not help either.
>> The masters are 5.3.3 version.
>>
>> Thank you
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Puppet Users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to puppet-users...@googlegroups.com <javascript:>.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/puppet-users/27d76968-bce6-4c17-aa7d-092ea9b0a768%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/puppet-users/27d76968-bce6-4c17-aa7d-092ea9b0a768%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/932824d7-c508-4d31-9c91-d8013470acb4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to