This is my structure of role:
$ tree my_role . ├── my_role │ ├── defaults │ │ └── main.yml │ ├── files │ │ └── foo.conf │ ├── handlers │ │ └── main.yml │ ├── meta │ │ └── main.yml │ ├── README.md │ ├── tasks │ │ └── main.yml │ ├── templates │ ├── tests │ │ ├── inventory │ │ └── test.yml │ └── vars │ └── main.yml └── playbook.yml
I would like to cat the file foo.conf located in files folder in tasks/main.yml.
I tried to use directly in tasks.yml by providing relevant path, however, it says the file is not found.
https://stackoverflow.com/questions/67305395/cat-a-file-located-in-files-directory-in-ansible April 29, 2021 at 01:48AM
没有评论:
发表评论