Closed naoya0408 closed 4 years ago
% ansible-playbook -i hosts playbook.yml (git)-[feature]
PLAY [all] ******************************************************************************************************************************************************************************
TASK [Gathering Facts] ******************************************************************************************************************************************************************
ok: [52.198.31.60]
ok: [3.112.222.233]
TASK [nginx : enable amzn2extra-nginx1.12 repository] ***********************************************************************************************************************************
ok: [52.198.31.60]
ok: [3.112.222.233]
TASK [nginx : install nginx packages from amazon-linux-extras] **************************************************************************************************************************
ok: [52.198.31.60]
ok: [3.112.222.233]
TASK [nginx : start nginx] **************************************************************************************************************************************************************
changed: [52.198.31.60]
changed: [3.112.222.233]
TASK [nginx : copy nginx.conf] **********************************************************************************************************************************************************
ok: [52.198.31.60]
ok: [3.112.222.233]
TASK [php : amzn2-core.repo priority down] **********************************************************************************************************************************************
ok: [52.198.31.60]
ok: [3.112.222.233]
TASK [php : amzn2-extras.repo priority down] ********************************************************************************************************************************************
changed: [52.198.31.60]
changed: [3.112.222.233]
TASK [php : install epel/remi] **********************************************************************************************************************************************************
changed: [52.198.31.60] => (item=http://rpms.famillecollet.com/enterprise/remi-release-7.rpm)
changed: [3.112.222.233] => (item=http://rpms.famillecollet.com/enterprise/remi-release-7.rpm)
ok: [52.198.31.60] => (item=https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm)
ok: [3.112.222.233] => (item=https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm)
TASK [php : php72 install] **************************************************************************************************************************************************************
changed: [52.198.31.60] => (item=php)
changed: [3.112.222.233] => (item=php)
changed: [52.198.31.60] => (item=php-devel)
changed: [3.112.222.233] => (item=php-devel)
changed: [52.198.31.60] => (item=php-fpm)
changed: [3.112.222.233] => (item=php-fpm)
changed: [52.198.31.60] => (item=php-gd)
changed: [3.112.222.233] => (item=php-gd)
changed: [52.198.31.60] => (item=php-mbstring)
changed: [3.112.222.233] => (item=php-mbstring)
changed: [52.198.31.60] => (item=php-mysqlnd)
changed: [3.112.222.233] => (item=php-mysqlnd)
TASK [php : start php-fpm] **************************************************************************************************************************************************************
changed: [3.112.222.233]
changed: [52.198.31.60]
TASK [php : copy www.conf] **************************************************************************************************************************************************************
changed: [52.198.31.60]
changed: [3.112.222.233]
TASK [wordpress : download wordpress] ***************************************************************************************************************************************************
changed: [52.198.31.60]
changed: [3.112.222.233]
TASK [wordpress : create www directory] *************************************************************************************************************************************************
ok: [3.112.222.233]
ok: [52.198.31.60]
TASK [wordpress : unzip wordpress file] *************************************************************************************************************************************************
changed: [3.112.222.233]
changed: [52.198.31.60]
TASK [wordpress : permission change wordpress directory] ********************************************************************************************************************************
changed: [3.112.222.233]
changed: [52.198.31.60]
TASK [wordpress : restart nginx] ********************************************************************************************************************************************************
changed: [52.198.31.60]
changed: [3.112.222.233]
RUNNING HANDLER [php : restart php-fpm] *************************************************************************************************************************************************
changed: [52.198.31.60]
changed: [3.112.222.233]
PLAY RECAP ******************************************************************************************************************************************************************************
3.112.222.233 : ok=17 changed=11 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
52.198.31.60 : ok=17 changed=11 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
コード、テスト良いと思います!
プルリクエストしますので、レビューをお願いいたします。
terraformの実行結果
ansibleの実行結果
パブリック IPにアクセスする→wordpressのセットアップを行う
ロードバランサーの確認
ヘルスチェックはhealthyになっていることを確認
ALBのDNS名を確認し、digコマンドで確認
;; ANSWER SECTION: aws-wordpress-alb-.ap-northeast-1.elb.amazonaws.com. 60 IN A 13.230.245.0 aws-wordpress-alb-.ap-northeast-1.elb.amazonaws.com. 60 IN A 13.115.25.219