Hi there,
i’m trying to connect our existing ansible roles into an already existing hugo website. Unfortunately this is all in a corporate environment which makes it difficult to share the code but i guess you’ll quickly understand where i am heading.
An Ansible role has (at least per our convention) a README.md in the main folder and a yaml file with the meta information under “meta/main.yml”. See for example this hugo ansible role. When trying to use that role in my website, i immediately was drawn to the hugo module support, where i would like to use that as follows:
[module]
[[module.imports]]
path = "github.com/manala/ansible-role-hugo"
disabled = false
[[module.imports.mounts]]
source = "README.md"
target = "content/ansible/roles/hugo/hugo.md"
As you can see i’d try to ONLY import the README.md file to make sure that no other files are rendered or copied to the target page (some roles are huge - doesn’t make sense). This configuration is fine so far - everything renders etc.
Then i tried to add a second mount with this configuration into the data folder
[module]
[[module.imports]]
path = "github.com/manala/ansible-role-hugo"
disabled = false
[[module.imports.mounts]]
source = "README.md"
target = "content/ansible/roles/hugo/hugo.md"
[[module.imports.mounts]]
source = "meta/main.yml"
target = "data/ansible/roles/hugo.yml"
which gives me the following error
ERROR 2020/04/03 12:37:22 Add site dependencies: create deps: create PathSpec: build filesystems: this fs supports directories only
Since i didn’t get to a configuration (i e.g. created the required subfolders etc) that worked for the mount of one file into the data folder my question boils down to: Should this be possible? Or will it ever be?
Thanks in advance!
Best Regards, Uli