Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add second example: hugo in a container
Signed-off-by: Tomas Tomecek <ttomecek@redhat.com>
- Loading branch information
1 parent
f8ffe52
commit 67d5665
Showing
2 changed files
with
51 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
--- | ||
- name: Obtain hugo | ||
hosts: all | ||
vars: | ||
site_path: /src | ||
ansible_bender: | ||
base_image: "fedora:29" | ||
target_image: | ||
name: hugo | ||
working_dir: /src | ||
cmd: "hugo server -wD --bind 0.0.0.0 --port 80" | ||
tasks: | ||
- name: Install hugo package | ||
package: | ||
name: | ||
- hugo | ||
- git-core | ||
- name: Initiate new hugo site at {{ site_path }} | ||
command: hugo new site {{ site_path }} | ||
- name: Add a hugo theme | ||
git: | ||
repo: https://github.com/budparr/gohugo-theme-ananke.git | ||
dest: '{{ site_path }}/themes/ananke' | ||
- name: Use the theme | ||
lineinfile: | ||
line: 'theme = "ananke"' | ||
path: '{{ site_path }}/config.toml' |