| [root@m01 ~] |
| [root@m01 ~] |
| User www |
| Group www |
| [root@m01 ~] |
| -rw-r--r-- 1 root root 19889622 Nov 22 15:52 php.tar.gz |
| [root@m01 ~] |
| [root@m01 tmp] |
| [root@m01 tmp] |
| user = www |
| group = www |
| [root@m01 tmp] |
| upload_max_filesize = 200M |
| post_max_size = 200M |
| [root@m01 ~] |
| -rw-r--r-- 1 root root 26995 Nov 22 16:47 kaoshi.zip |
| |
| ansible web_group -m yum -a 'name=httpd state=present' &&\ |
| |
| ansible web_group,nfs -m group -a 'name=www gid=666 state=present' &&\ |
| |
| ansible web_group,nfs -m user -a 'name=www uid=666 group=www shell=/sbin/nologin create_home=false' &&\ |
| |
| ansible web_group -m copy -a 'src=/etc/httpd/conf/httpd.conf dest=/etc/httpd/conf/' &&\ |
| |
| ansible web_group -m unarchive -a 'src=/root/php.tar.gz dest=/tmp/' &&\ |
| |
| ansible web_group -m shell -a 'yum localinstall -y /tmp/*.rpm' &&\ |
| |
| ansible web_group -m copy -a 'src=/etc/php-fpm.d/www.conf dest=/etc/php-fpm.d/' &&\ |
| ansible web_group -m copy -a 'src=/etc/php.ini dest=/etc/' &&\ |
| |
| ansible web_group -m systemd -a 'name=php-fpm state=started enabled=yes' &&\ |
| |
| ansible web_group -m systemd -a 'name=httpd state=started enabled=yes' &&\ |
| |
| ansible web_group -m unarchive -a 'src=/root/kaoshi.zip dest=/var/www/html/ owner=www group=www' &&\ |
| |
| ansible web_group -m file -a 'path=/var/www/ state=directory owner=www group=www recurse=yes' &&\ |
| |
| ansible nfs -m yum -a 'name=nfs-utils state=present' &&\ |
| |
| ansible web_group,nfs -m yum -a 'name=rpcbind state=present' &&\ |
| |
| ansible nfs -m copy -a 'content="/data 172.16.1.0/24(rw,sync,all_squash,anonuid=666,anongid=666)" dest=/etc/exports' &&\ |
| |
| ansible nfs -m file -a 'path=/data state=directory owner=www group=www' &&\ |
| |
| ansible nfs -m systemd -a 'name=nfs state=started' &&\ |
| |
| ansible nfs -m systemd -a 'name=rpcbind state=started' &&\ |
| |
| ansible web_group -m file -a 'path=/var/www/html/upload state=directory owner=www group=www' &&\ |
| |
| ansible web_group -m mount -a 'src=172.16.1.31:/data path=/var/www/html/upload fstype=nfs opts=defaults state=mounted' |