Ordering problem

asked 2018-05-31 06:07:50 -0600

Angel Casanova gravatar image

Hello,

I have the following class structure:

class main {
    class { 'main::a':
    }
    class { 'main::b':
         require => Class['main::a'],
    }  
}

class main::a {
    file { 'file1':
    }
    main::a::b { 'defined_resource1':
    }
}

class main::b {
    file { 'file2':
    }
}

I would like defined_resource1 to be applied before anything inside class main::b but when I apply the manifest file2 is created just after file1 and before defined_resource1

Any ideas why is this happening?

Kind Regards, Ángel

edit retag flag offensive close merge delete

Comments

_How_ have you determined that defined_resource1 is applied after file2 is created/changed? Can you put a notify{} resource inside main::a::b's definition, just to verify that your observations are correct?

Kai Burghardt gravatar imageKai Burghardt ( 2018-06-01 17:37:11 -0600 )edit