parent
3a97e5bd1b
commit
b9c9e12275
@ -1,28 +0,0 @@
|
||||
---
|
||||
# this is an annotated example of some features available in playbooks
|
||||
# it shows how to make sure packages are updated, how to make sure
|
||||
# services are running, and how to template files. It also demos
|
||||
# change handlers that can restart things (or trigger other actions)
|
||||
# when resources change. For more advanced examples, see example2.yml
|
||||
|
||||
# on all hosts, run as the user root...
|
||||
|
||||
- name: example play
|
||||
hosts: all
|
||||
|
||||
# could have also have done:
|
||||
# remote_user: mdehaan
|
||||
# sudo: yes
|
||||
|
||||
# make these variables available inside of templates
|
||||
# for when we use the 'template' action/module later on...
|
||||
|
||||
vars:
|
||||
http_port: 80
|
||||
max_clients: 200
|
||||
|
||||
# define the tasks that are part of this play...
|
||||
|
||||
tasks:
|
||||
- name: ping
|
||||
ping:
|
@ -0,0 +1,22 @@
|
||||
---
|
||||
- name: Setup SSH key
|
||||
hosts: servers
|
||||
tasks:
|
||||
- authorized_key:
|
||||
user: alpha
|
||||
state: present
|
||||
key: "{{ lookup('file', '~/.ssh/pressure_drop_rsa.pub') }}"
|
||||
|
||||
- name: Update apt
|
||||
hosts: servers
|
||||
tasks:
|
||||
- apt: update_cache=yes
|
||||
become: true
|
||||
- apt: upgrade=dist
|
||||
become: true
|
||||
|
||||
- name: Setup ZNC
|
||||
hosts: servers
|
||||
tasks:
|
||||
- apt: name=znc state=present
|
||||
become: true
|
Loading…
Reference in new issue