Ask Your Question
0

random execute lines in environments - why?

asked 2016-01-31 10:41:46 -0500

nobody gravatar image

updated 2016-01-31 10:57:38 -0500

Hi all! I have some environments

    case $operatingsystem  {
        debian, ubuntu: {
            file { '/etc/resolv.conf': ensure => file, source => "puppet:///modules/checklist_debian/resolv.conf", }
            file { '/usr/local/sbin/check_puppet.sh': ensure => file, source => "puppet:///modules/other/check_puppet.sh", mode => '0555', }
            file { '/etc/apt/sources.list': ensure => file, content => template("checklist_debian/sources.list"), notify => Exec['update-apt'], }


            package { "ipmitool": ensure => installed, }
            package { "iptables-persistent": ensure => installed, }
            package { "sysv-rc-conf": ensure => installed, }
            package { "cron": ensure => installed, }
            package { "nano": ensure => installed, }
            package { "vim": ensure => installed, }
            package { "htop": ensure => installed, }
            package { "puppet": ensure => installed, }
            package { "bacula-fd": ensure => installed, }
            package { "subversion": ensure => installed, }
            package { "git": ensure => installed, }
            ...

and execute my puppet client: puppet agent --debug --no-daemonize --onetime --environment checklist but puppet client doing my checklist.pp absolutely random! Why? Why he is doing that? I want him to perform it in a queue, how i write it in my manifest (checklist.pp) line by line. How i can say it him?

    Info: Applying configuration version '1454257542'
    Debug: Prefetching apt resources for package
    Debug: Executing '/usr/bin/dpkg-query -W --showformat '${Status} ${Package} ${Version}\n''
    Debug: Executing '/usr/bin/dpkg-query -W --showformat '${Status} ${Package} ${Version}\n' subversion'
    Debug: Executing '/usr/bin/apt-get -q -y -o DPkg::Options::=--force-confold install subversion'
    Notice: /Stage[main]/Main/Package[subversion]/ensure: ensure changed 'purged' to 'present'
    Debug: /Package[subversion]: The container Class[Main] will propagate my refresh event
    Debug: Executing '/usr/bin/dpkg-query -W --showformat '${Status} ${Package} ${Version}\n' git'
    Debug: Executing '/usr/bin/apt-get -q -y -o DPkg::Options::=--force-confold install git'
    Notice: /Stage[main]/Main/Package[git]/ensure: ensure changed 'purged' to 'present'
    Debug: /Package[git]: The container Class[Main] will propagate my refresh event
    Notice: /Stage[main]/Main/File[/root/.mc]/ensure: created
    Debug: /Stage[main]/Main/File[/root/.mc]: The container Class[Main] will propagate my refresh event
    Debug: Failed to load library 'msgpack' for feature 'msgpack'
    Debug: Puppet::Network::Format[msgpack]: feature msgpack is missing
    Debug: file_metadata supports formats: pson b64_zlib_yaml yaml raw
    Debug: Closing connection for https://puppet-master:8140
    Debug: Creating new connection for https://puppet-master:8140
    Debug: Starting connection for https://puppet-master:8140
    Debug: Caching connection for https://puppet-master:8140
    Info: Computing checksum on file /etc/bash.bashrc
    Info: /Stage[main]/Main/File[/etc/bash.bashrc]: Filebucketed /etc/bash.bashrc to puppet with sum 87b895cef45b8090d628a1d9a0f4bfb8
    Debug: Using cached connection for https://puppet-master:8140
    Debug: Caching connection for https://puppet-master:8140
    Notice: /Stage[main]/Main/File[/etc/bash.bashrc]/content: content changed '{md5}87b895cef45b8090d628a1d9a0f4bfb8' to '{md5}ca6dec875431ce138a648c96f20838b2'
    Debug: /Stage[main]/Main/File[/etc/bash.bashrc]: The container Class[Main] will propagate my refresh event
    Debug: Executing '/usr/bin/dpkg-query -W --showformat '${Status} ${Package} ${Version}\n' sysv-rc-conf'
    Debug: Executing '/usr/bin/apt-get -q -y -o DPkg::Options::=--force-confold install sysv-rc-conf'
    Notice: /Stage[main]/Main/Package[sysv-rc-conf]/ensure: ensure changed 'purged' to 'present'
    Debug: /Package[sysv-rc-conf]: The container Class[Main] will propagate my refresh event
    Debug: Executing '/usr/bin/dpkg-query -W --showformat '${Status} ${Package} ${Version}\n' htop'
    Debug: Executing '/usr/bin/apt-get -q -y -o DPkg::Options::=--force-confold install htop'
    Notice: /Stage ...
(more)
edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2016-01-31 22:57:39 -0500

updated 2016-02-04 07:55:34 -0500

That's pretty much how Puppet works. If you don't specify relationships between resources using require, before, subscribe, or notify, Puppet determines the ordering internally, and it's most likely title-hash ordering that you're seeing. Have a look at this.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2016-01-31 10:41:46 -0500

Seen: 111 times

Last updated: Feb 04 '16