Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ---
- - hosts: localhost
- connection: local
- vars_prompt:
- - name: 'username'
- prompt: 'Username'
- private: no
- - name: 'userpass'
- prompt: 'Password'
- private: no
- tasks:
- - name: 'Add PHP repo'
- action: 'apt_repository repo=ppa:ondrej/php update_cache=yes'
- - name: 'Install packages'
- apt:
- name:
- - php7.0-fpm
- - php7.1-fpm
- - php7.2-fpm
- - php7.3-fpm
- - apache2
- state: latest
- update_cache: no
- - name: 'Enable Apache2 modules'
- apache2_module:
- name: "{{ item }}"
- state: present
- with_items:
- - rewrite
- - proxy
- - proxy_fcgi
- - name: 'Create user'
- user: 'name={{ username }} password={{userpass |password_hash("sha512") }} update_password=on_create shell=/bin/bash home=/home/{{ username }} state=present'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement