Merge pull request #18533 from alice-sawatzky/master
change chef linux provisioner to use user:group chown syntax
This commit is contained in:
commit
56e6c60f76
|
@ -92,7 +92,7 @@ func (p *provisioner) linuxCreateConfigFiles(o terraform.UIOutput, comm communic
|
||||||
if err := p.runCommand(o, comm, fmt.Sprintf(chmod, hintsDir, 600)); err != nil {
|
if err := p.runCommand(o, comm, fmt.Sprintf(chmod, hintsDir, 600)); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
if err := p.runCommand(o, comm, "chown -R root.root "+hintsDir); err != nil {
|
if err := p.runCommand(o, comm, "chown -R root:root "+hintsDir); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -106,7 +106,7 @@ func (p *provisioner) linuxCreateConfigFiles(o terraform.UIOutput, comm communic
|
||||||
if err := p.runCommand(o, comm, fmt.Sprintf(chmod, linuxConfDir, 600)); err != nil {
|
if err := p.runCommand(o, comm, fmt.Sprintf(chmod, linuxConfDir, 600)); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
if err := p.runCommand(o, comm, "chown -R root.root "+linuxConfDir); err != nil {
|
if err := p.runCommand(o, comm, "chown -R root:root "+linuxConfDir); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -193,10 +193,10 @@ func TestResourceProvider_linuxCreateConfigFiles(t *testing.T) {
|
||||||
"sudo " + fmt.Sprintf(chmod, path.Join(linuxConfDir, "ohai/hints"), 666): true,
|
"sudo " + fmt.Sprintf(chmod, path.Join(linuxConfDir, "ohai/hints"), 666): true,
|
||||||
"sudo chmod 755 " + path.Join(linuxConfDir, "ohai/hints"): true,
|
"sudo chmod 755 " + path.Join(linuxConfDir, "ohai/hints"): true,
|
||||||
"sudo " + fmt.Sprintf(chmod, path.Join(linuxConfDir, "ohai/hints"), 600): true,
|
"sudo " + fmt.Sprintf(chmod, path.Join(linuxConfDir, "ohai/hints"), 600): true,
|
||||||
"sudo chown -R root.root " + path.Join(linuxConfDir, "ohai/hints"): true,
|
"sudo chown -R root:root " + path.Join(linuxConfDir, "ohai/hints"): true,
|
||||||
"sudo chmod 755 " + linuxConfDir: true,
|
"sudo chmod 755 " + linuxConfDir: true,
|
||||||
"sudo " + fmt.Sprintf(chmod, linuxConfDir, 600): true,
|
"sudo " + fmt.Sprintf(chmod, linuxConfDir, 600): true,
|
||||||
"sudo chown -R root.root " + linuxConfDir: true,
|
"sudo chown -R root:root " + linuxConfDir: true,
|
||||||
},
|
},
|
||||||
|
|
||||||
Uploads: map[string]string{
|
Uploads: map[string]string{
|
||||||
|
|
Loading…
Reference in New Issue