21 lines
291 B
Go
21 lines
291 B
Go
|
package main
|
||
|
|
||
|
import (
|
||
|
"context"
|
||
|
"log"
|
||
|
"os"
|
||
|
"os/exec"
|
||
|
)
|
||
|
|
||
|
func Ansible(ctx context.Context) error {
|
||
|
log.Printf("running ansible playbook\n")
|
||
|
|
||
|
cmd := exec.Command("ansible-playbook", "site.yml")
|
||
|
|
||
|
cmd.Stdout = os.Stdout
|
||
|
cmd.Stdin = os.Stdin
|
||
|
cmd.Stderr = os.Stderr
|
||
|
|
||
|
return cmd.Run()
|
||
|
}
|