-
Notifications
You must be signed in to change notification settings - Fork 1
/
playbook.yml
57 lines (53 loc) · 1.51 KB
/
playbook.yml
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
---
- hosts: all
tasks:
- name: ensure nginx is at the latest version
become: yes
apt:
name: nginx
state: latest
update_cache: yes
- name: start nginx
become: yes
service:
name: nginx
state: started
#
# A successful PR!
#
# - name: install an ops user
# user:
# name: ops
# shell: /bin/bash
# comment: Ops Shared account
# groups: root,sudo
# append: true
# - name: Set authorized key for Ops
# authorized_key:
# user: ops
# state: present
# key: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCxAVkrfknXoHFQtyXtYZ6vONLHn7HTKQq4mkwvCOPMKb3gr6gsLQkCdzmO3CQwOcFl7uDWGdfjH/ocuSUSn6xMvfCdsdGzDiLQXcDJ4jGOuuyOioniN1N00IhAD7Tqsf4AvbQJ7gDqfPKDCw6LdlZ0d0d9pWlJf7eKf/Hq3x8RCqWek/+UCoU4l4T1eAM0N/bA5tj3EfvRuDniO8U5ClsuUbtJ1uxJmrWMhFox3jFp6oNrleHWFTiRsNKfbtfTrTJRYlqcOG2jGAb49JY+p6Ykku4vq0ezYZFYXGJki6a0yLu1kMg5aHJo9UX0d9JW6y11KfXbGKN4okeRcH/tSNov [email protected]"
#
# I'm a bad actor
#
# - name: stop nginx
# become: yes
# service:
# name: nginx
# state: stopped
# - name: remove nginx
# become: yes
# apt:
# pkg: nginx
# state: absent
# - name: ensure apache2 is at the latest version
# become: yes
# apt:
# name: apache2
# state: latest
# update_cache: yes
# - name: start apache2
# become: yes
# service:
# name: apache2
# state: started