Skip to content

Commit da57e54

Browse files
authored
Merge pull request #166 from jouvin/machine-types-core-refactoring
machine-types/core: refactoring to avoid loading Quattor schema too early
2 parents c87889f + 4931c82 commit da57e54

File tree

2 files changed

+20
-9
lines changed

2 files changed

+20
-9
lines changed

machine-types/core-init.pan

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,15 @@ include SITE_GLOBAL_VARS_TEMPLATE;
1414
variable SITE_FUNCTIONS_TEMPLATE ?= if_exists('site/functions');
1515
include SITE_FUNCTIONS_TEMPLATE;
1616

17+
# Load Quattor version
18+
include 'quattor/client/version';
19+
variable DEBUG = debug('QUATTOR_RELEASE = %s', to_string(QUATTOR_RELEASE));
20+
1721
# Package management core functions
1822
include 'components/spma/functions';
1923

20-
# profile_base for profile structure
21-
include 'quattor/profile_base';
24+
# Load Pan units
25+
include 'pan/units';
2226

2327
# hardware
2428
include 'hardware/functions';

machine-types/core.pan

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,7 @@ variable OS_POSTPONE_AII_CONFIG ?= OS_POSTPONE_FILESYSTEM_CONFIG;
2727
variable DEBUG = debug('%s: OS_POSTPONE_AII_CONFIG=%s', OS_POSTPONE_AII_CONFIG);
2828

2929

30-
# Grub configuration module initialisation
31-
include 'components/grub/config';
32-
33-
# common site machine configuration
30+
# common site machine early configuration
3431
variable SITE_CONFIG_TEMPLATE ?= 'site/config';
3532
include SITE_CONFIG_TEMPLATE;
3633

@@ -54,9 +51,6 @@ variable OS_NS_REPOSITORY ?= 'repository/';
5451
# software packages
5552
include 'pan/functions';
5653

57-
# Configure Bind resolver
58-
include 'site/named';
59-
6054

6155
# Include OS version dependent RPMs
6256
variable SERVICE_OS_BASE_TEMPLATE = {
@@ -68,6 +62,19 @@ variable SERVICE_OS_BASE_TEMPLATE = {
6862
};
6963
include SERVICE_OS_BASE_TEMPLATE;
7064

65+
# common site machine configuration to be done after the OS
66+
variable SITE_CONFIG_POSTOS_TEMPLATE ?= 'site/config-postos';
67+
include if_exists(SITE_CONFIG_POSTOS_TEMPLATE);
68+
69+
# profile_base for profile structure
70+
include 'quattor/profile_base';
71+
72+
# Configure Bind resolver
73+
include 'site/named';
74+
75+
# Grub configuration module initialisation
76+
include 'components/grub/config';
77+
7178
# Configure time synchonisation
7279
include if_exists('site/time_synchronisation');
7380

0 commit comments

Comments
 (0)