You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
522 B
26 lines
522 B
require "yaml"
|
|
|
|
DOMAIN = ENV.fetch("LOTUS_LAND_STORY_DOMAIN")
|
|
|
|
task terraform: "terraform.tfvars" do
|
|
sh "terraform apply"
|
|
end
|
|
|
|
task ansible: "vars.yml" do
|
|
sh "ansible-playbook main.yml"
|
|
end
|
|
|
|
task "terraform.tfvars" do |t|
|
|
File.write(t.name, "domain = \"#{DOMAIN}\"")
|
|
end
|
|
|
|
task "vars.yml" do |t|
|
|
miniflux_password = `op read op://Private/Miniflux/password`.strip
|
|
File.write(t.name, YAML.dump({
|
|
"domain" => DOMAIN,
|
|
"miniflux_password" => miniflux_password,
|
|
}))
|
|
end
|
|
|
|
task default: %i[ terraform ansible ]
|