LoginSignup
4
5

More than 5 years have passed since last update.

ansible2系で起こったバグの一部紹介

Posted at

ansible2系にアップデートしてみたところ、以前作成したplaybookが一部うまく行っていない現象に陥ったので、その一部のyum groupinstallについて記載します。

yum groupinstallが上手くいかない

やろうとしていたこと

  • Development Toolsのインストール
# yum groupinstall "Development Tools"

作成済みのplaybookの内容

roles/groupinstall/tasks/main.yml
- name: install the 'Development tools' package group
  yum: name="@Development tools" state=latest

普段はVagrant上でテストしているのでvagrant upでansibleのprovisioning実行して見たところ、特にエラーらしいものもなかったので、serverspecでテストを通してみたところ、本来インストールされているはずのパッケージが入ってない...(gccとか)

対処法

roles/groupinstall-after/tasks/main.yml
- name: install the 'Development tools' package group
  become: true
  yum: name="@development tools" state=present

こちらを参考に修正

4
5
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
5