-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexample.txt
47 lines (38 loc) · 1.26 KB
/
example.txt
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
## trololo
#- name: Insert trololo
# lineinfile: dest=/etc/trololo state=present regexp="{{ trololo }}" insertafter="trololo" line="trololo"
# notify: restart trololo
python linerAPI.py '- name: Insert trololo lineinfile: dest=/etc/trololo state=present regexp="{{ trololo }}" insertafter="trololo" line="trololo" notify: restart trololo'
- name: Trololo
lineinfile:
dest: /etc/trololo
regexp: {{ trololo }}
line: yolo
state: present
- name: Insert again trololo
lineinfile:
dest: /etc/trololo
regexp: "{{ trololo }}"
state: present
line: trololo
insertafter: trololo
notify: restart trololo
- name: Check trololo
include_role:
name: trololo
tasks_from: troll
run_once: true
when: playbook_event == "trololo"
- name: Install trololo
include: install.yml
when: yolo is defined and trololo == true
- name: Active yolo
include: yolo.yml
when: yolo is defined and yolo == true
#### to do
- name: yolo
virt_net: command=define name={{ yolo }} xml='{{ lookup("template", "{{ yolo }}") }}'
- name: Insert trololo
lineinfile : dest=/etc/trololo state=present regexp="{{ trololo }}" insertafter="trololo" line="trololo"
- name: Yolo
replace: dest=/etc/netconfig regexp="^udp6(.*)" replace="# ansible_managed\n#udp6\1"