Help us understand the problem. What is going on with this article?

Nginx, PHP-FPM, PHP, MySQLをAnsibleでインストール

More than 5 years have passed since last update.



- hosts: web-server
  remote_user: vagrant
  sudo: yes
  gather_facts: no

    - name: install nginx rpm
      yum: name= state=present

    - name: install nginx
      yum: name=nginx state=present

    - name: restart nginx
      service: name=nginx state=restarted

    - name: chkconfig nginx
      command: chkconfig nginx on

    - name: install php-fpm
      yum: name=php-fpm state=latest

    - name: apply php-fpm.conf
      template: src=./php-fpm.conf.tpl dest=/etc/php-fpm.d/www.conf backup=yes

    - name: restart php-fpm
      service: name=php-fpm state=restarted

    - name: chkconfig php-fpm
      command: chkconfig php-fpm on

    - name: install php rpm
      yum: name= state=present

    - name: install php
      yum: pkg={{item}} enablerepo=remi,remi-php56 state=present
        - php
        - php-devel
        - php-common
        - php-gd
        - php-mbstring
        - php-mysql
        - php-pdo
        - php-pear
        - php-xml

    - name: install mysql rpm
      yum: pkg={{item}} state=present

    - name: install mysql
      yum: pkg={{item}} state=present
        - MySQL-client.x86_64
        - MySQL-devel.x86_64
        - MySQL-server.x86_64
        - MySQL-shared-compat.x86_64
        - MySQL-shared.x86_64

    - name: chkconfig mysql
      command: chkconfig mysql on

    - name: restart mysql
      service: name=mysql state=restarted


$ ansible-playbook -i servers setup.yml -k -K
 [WARNING]: The version of gmp you have installed has a known issue regarding
timing vulnerabilities when used with pycrypto. If possible, you should update
it (i.e. yum update gmp).

SSH password:
sudo password [defaults to SSH password]:

PLAY [web-server] *************************************************************

GATHERING FACTS ***************************************************************
ok: []

TASK: [install nginx rpm] *****************************************************
ok: []

TASK: [install nginx] *********************************************************
ok: []

TASK: [restart nginx] *********************************************************
changed: []

TASK: [chkconfig nginx] *******************************************************
changed: []

TASK: [install php-fpm] *******************************************************
ok: []

TASK: [apply php-fpm.conf] ****************************************************
ok: []

TASK: [restart php-fpm] *******************************************************
changed: []

TASK: [chkconfig php-fpm] *****************************************************
changed: []

TASK: [install php rpm] *******************************************************
ok: []

TASK: [install php] ***********************************************************
ok: [] => (item=php,php-devel,php-common,php-gd,php-mbstring,php-mysql,php-pdo,php-pear,php-xml)

TASK: [install mysql rpm] *****************************************************
ok: [] => (item=,,,,

TASK: [install mysql] *********************************************************
ok: [] => (item=MySQL-client.x86_64,MySQL-devel.x86_64,MySQL-server.x86_64,MySQL-shared-compat.x86_64,MySQL-shared.x86_64)

TASK: [chkconfig mysql] *******************************************************
changed: []

TASK: [restart mysql] *********************************************************
changed: []

PLAY RECAP ********************************************************************              : ok=15   changed=6    unreachable=0    failed=0

Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away