-
Notifications
You must be signed in to change notification settings - Fork 18
/
prod.yml.template
40 lines (35 loc) · 1.22 KB
/
prod.yml.template
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# Ansible is not available in the default repositories that apt-get uses. Therefore, add the repository ppa:rquillo/ansible.
# sudo add-apt-repository ppa:rquillo/ansible
# Press ENTER when prompted.
# Update the package lists.
# sudo apt-get update
# Install Ansible.
# sudo apt-get install ansible
# In case of ansible install issues try the following
# sudo apt-get install software-properties-common
# sudo apt-add-repository ppa:ansible/ansible
# sudo apt-get update
# sudo apt-get install ansible
#
#
# ansible-playbook prod.yml
# make sure hosts points to right server
#
# Make sure user is able to run sudo w/o password
#
# Use "sudo visudo" to edit sudoers!
# #Allow members of group sudo to execute any command without asking password
# #%sudo ALL=(ALL:ALL) ALL
# %sudo ALL=(ALL) NOPASSWD:ALL
# #allow specific user to do so without password, where slavko is the username
# slavko ALL=(ALL) NOPASSWD: ALL
- hosts: prod
vars:
deploy_user: "{{ansible_ssh_user}}"
install_php: "no" # Notifies additional tools to integrate with php ; set to yes when playing with lamp
root_dir: .
tasks:
- include_tasks: tasks_webmin.yml
handlers:
- name: restart apache2
service: name=apache2 state=restarted