Skip to content

Commit be2fec8

Browse files
committed
Add file resources to handle directory path creation.
1 parent e44ec9d commit be2fec8

File tree

1 file changed

+16
-6
lines changed

1 file changed

+16
-6
lines changed

manifests/init.pp

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -98,18 +98,28 @@
9898
fail ('No cluster defined for kolla configuration. Cannot continue.')
9999
}
100100

101-
# Make sure the kolla config directory exists
102-
file { $kolla_etc:
101+
# Make sure the install directories exist
102+
$kolla_etc_dirs = dirtree($kolla_etc)
103+
file { $kolla_etc_dirs:
103104
ensure => 'directory',
104-
mode => '0755',
105+
#mode => '0755',
106+
owner => 'root',
107+
group => 'root',
108+
}
109+
110+
# Deepest part of this path...
111+
$kolla_deploy_dirs = dirtree($kolla_venv)
112+
file { $kolla_deploy_dirs:
113+
ensure => 'directory',
114+
#mode => '0755',
105115
owner => 'root',
106116
group => 'root',
107117
}
108118

109119
# The global config file
110120
file { 'globals.yml':
111121
ensure => file,
112-
path => "${kolla_etc}/${cluster}/globals.yml",
122+
path => "${kolla_etc}/globals.yml",
113123
owner => 'root',
114124
group => 'root',
115125
mode => '0600',
@@ -119,7 +129,7 @@
119129
# The password file
120130
file { 'passwords.yml':
121131
ensure => file,
122-
path => "${kolla_etc}/${cluster}/passwords.yml",
132+
path => "${kolla_etc}/passwords.yml",
123133
owner => 'root',
124134
group => 'root',
125135
mode => '0600',
@@ -129,7 +139,7 @@
129139
# The admin-rc file
130140
file { 'admin-openrc.sh':
131141
ensure => file,
132-
path => "${kolla_etc}/${cluster}/admin-openrc.sh",
142+
path => "${kolla_etc}/admin-openrc.sh",
133143
owner => 'root',
134144
group => 'root',
135145
mode => '0600',

0 commit comments

Comments
 (0)