httpd24-tools conflicts with httpd-tools-2.2.34-1.15.amzn1.x86_64

playbook.ymlでyum installを書きます。

---
- hosts: all
  sudo: yes
  tasks:
    - name: Install a list of packages
      yum:
        name:
          - httpd24
          - php71
	  - mysql56-server
          - php71-mysqlnd
        state: present
    - name: start apache and enabled
      service: name=httpd state=started enabled=yes

fatal: [192.168.33.10]: FAILED! => {“changed”: false, “msg”: “Error: httpd24-tools conflicts with httpd-tools-2.2.34-1.15.amzn1.x86_64\n”, “rc”: 1, “results”: [“Loaded plugins: priorities, update-motd, upgrade-helper\nResolving Dependencies\n–> Running transaction check\n—> Package httpd24.x86_64 0:2.4.27-3.73.amzn1 will be installed\n–> Processing Dependency: httpd24-tools = 2.4.27-3.73.amzn1 for package: httpd24-2.4.27-3.73.amzn1.x86_64\n—> Package mysql56-server.x86_64 0:5.6.37-1.26.amzn1 will be installed\n–> Processing Dependency: mysql56-common(x86-64) = 5.6.37-1.26.amzn1 for package: mysql56-server-5.6.37-1.26.amzn1.x86_64\n–> Processing Dependency: mysql56-errmsg(x86-64) = 5.6.37-1.26.amzn1 for package: mysql56-server-5.6.37-1.26.amzn1.x86_64\n–> ….

httpd24とhttpd-tools-2.2.34がconflictとなっているようです。
勘違いしていたのが、php71を入れると、httpdがインストールされるので、httpd24は削除します。

PLAY [all] *********************************************************************

TASK [Gathering Facts] *********************************************************
ok: [192.168.33.10]

TASK [Install a list of packages] **********************************************
ok: [192.168.33.10]

TASK [start apache and enabled] ************************************************
changed: [192.168.33.10]

PLAY RECAP *********************************************************************
192.168.33.10 : ok=3 changed=1 unreachable=0 failed=0

OK!
ただ、playbook.ymlがどんどん増えていくんだが、これでいいのか?