Intellij 打开目录,将 ansible playbook scripts/yaml 文件作为项目

Intellij open directory with ansible playbook scripts/yaml files as project

我想在 Intellij 中打开一个目录作为项目。该目录包含 automation/ansible 个脚本 (yaml/sh/etc) 文件。试图寻找解决方案但没有结果。我如何在 IntelliJ 中执行此操作?

以下步骤对我有用。我正在使用安装了 YAML/Ansible support 插件的 Ultimate 2018.2。

  1. File>New>Project from Existing Sources 或者如果在现有项目 File>New>Module from Existing Sources 中添加为模块,则 select 包含脚本的文件夹。
  2. 在接下来的window、select中Create project from existing sources选项。点击Next后windows然后Finish.

在 Mac OS 上,执行

$ cd /path/to/the/project/root/directory
$ open -a 'IntelliJ IDEA 2018.2' &

项目将自动创建。