Skip to content

Commit 1837633

Browse files
committed
Removed trailing spaces
1 parent bce6361 commit 1837633

5 files changed

Lines changed: 25 additions & 22 deletions

File tree

ansible-101/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ clean:
1717
rm *.pyc __pycache__ -fr
1818
find notebooks -name '*_removed.nbconvert.ipynb' -delete
1919
find notebooks -name '*_removed.ipynb' -delete
20-
find notebooks -name '*.ipynb' -exec jupyter nbconvert --clear-output {} \;
21-
find notebooks -name \*.yml -type f -exec sed -i 's/[[:space:]]*$//' {} \;
20+
find notebooks -name \*.yml -type f -exec sed -i 's/[[:space:]]*$$//' {} \;
2221
find notebooks -name \*.yml -type f -exec ansible-lint {} \;
22+
find notebooks -name '*.ipynb' -exec nbstripout {} \;
2323
# $(foreach dpath, $(EXTERNAL_COURSES), rm -f notebooks/$(dpath)/*.ipynb; )
2424

2525
clean-other:

ansible-101/notebooks/exercise-07/.add_key.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@
1919
authorized_key:
2020
user: fizz
2121
state: present
22-
key: "{{ lookup('file', '/tmp/id_ecdsa_new.pub') }}"
22+
key: "{{ lookup('file', '/tmp/id_ecdsa_new.pub') }}"
2323

2424
- name: Add host as ip
25-
add_host:
25+
add_host:
2626
ansible_ssh_host: "{{ansible_default_ipv4.address}}"
2727
hostname: "{{ansible_default_ipv4.address}}"
2828
groups: test
@@ -38,5 +38,5 @@
3838
tasks:
3939
- name: Just ping
4040
shell: hostname
41-
42-
41+
42+

ansible-101/notebooks/exercise-07/add_key.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
- hosts: web
22
tasks:
33
- name: Create a new keypair on localhost
4-
delegate_to:
4+
delegate_to:
55
run_once: yes
66
user:
77
name: root
@@ -18,12 +18,12 @@
1818
Install remotely a local PK. Use the
1919
authorized_key docs to complete this task
2020
authorized_key:
21-
user:
22-
state:
21+
user:
22+
state:
2323
2424
- name: Add this host to the inventory
25-
add_host:
26-
ansible_ssh_host:
25+
add_host:
26+
ansible_ssh_host:
2727
hostname: "{{ansible_default_ipv4.address}}"
2828
groups: test
2929

@@ -45,5 +45,5 @@
4545
tasks:
4646
- name: A test command
4747
shell: hostname
48-
49-
48+
49+

ansible-101/notebooks/exercise-07/debug.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
tasks:
55
- name: This is the debug module.
66
debug: msg="A string"
7-
7+
88
- name: The debug module can print a variable too
99
debug: var=ansible_hostname
1010

@@ -13,7 +13,7 @@
1313
name: those tasks are run on every web host
1414
tasks:
1515
- name: Iterating over a list
16-
debug:
16+
debug:
1717
msg: >
1818
Host: {{item}}
1919
with_items: >
@@ -24,30 +24,30 @@
2424
name: Run only on first host
2525
tasks:
2626
- name: Iterating over a map yields the keys
27-
debug:
27+
debug:
2828
msg: >
2929
Host: {{item}}
3030
with_items: >
3131
{{ hostvars }}
3232
- name: Use subscript to access entries
33-
debug:
33+
debug:
3434
msg: >
3535
address: {{ hostvars[item]['ansible_default_ipv4']['address'] }}
3636
with_items: >
3737
{{ groups['web'] }}
38-
38+
3939
4040
- hosts: web[0]
4141
tags: filters
4242
name: Get a list of defined host ips.
4343
tasks:
4444

4545
- name: Using filters
46-
debug:
46+
debug:
4747
msg: >
48-
{{ groups['web'] |
49-
map('extract', hostvars, ['ansible_default_ipv4', 'address']) |
50-
reject('undefined') |
48+
{{ groups['web'] |
49+
map('extract', hostvars, ['ansible_default_ipv4', 'address']) |
50+
reject('undefined') |
5151
list }}
5252
5353

python-for-sysadmin/requirements.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ ansible
1313
docker-py
1414
pyyaml
1515

16+
# jupyter tools
17+
nbstripout
18+
1619
# Load jupyter extensions for exercises.
1720
jupyter_contrib_nbextensions
1821
RISE

0 commit comments

Comments
 (0)