AWXで “There are no available playbook directories in /var/lib/awx/projects. ” と表示される

AWXでSCM タイプを手動にしたときに以下のエラーが表示されPlaybookを選択できない事象に出くわしました。解決できたのでメモっておきます。

WARNING: There are no available playbook directories in /var/lib/awx/projects. Either that directory is empty, or all of the contents are already assigned to other projects. Create a new directory there and make sure the playbook files can be read by the “awx” system user, or have AWX directly retrieve your playbooks from source control using the SCM Type option above.

対象方法

1. project_data_dir のコメントアウトを解除

AWXのインストール時にinventory ファイルの「project_data_dir=/var/lib/awx/projects」のコメントアウトを削除する必要があります。

# AWX project data folder. If you need access to the location where AWX stores the projects
# it manages from the docker host, you can set this to turn it into a volume for the container.
project_data_dir=/var/lib/awx/projects

コメントアウトを削除してから、以下のコマンドを実行すると、Linux上に /var/lib/awx/projectsディレクトリが作成されます。

ansible-playbook -i inventory install.yml

2. /var/lib/awx/projects ディレクトリ配下にプロジェクトフォルダを作成

プロジェクトベースのは配下に、プレイブックディレクトリを作成します。

# pwd
/var/lib/awx/projects
# mkdir team01
# ls
team01

これで作成したディレクトリをAWX上から選択できるようになります。

以上。

コメント

タイトルとURLをコピーしました