Skip to content

Commit c561ea1

Browse files
minor cleanup
1 parent ecd00fa commit c561ea1

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

hosts.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ all:
2020
# are configuring in our main playbook.
2121
ansible_network_os: "ios"
2222
ansible_user: "ansible"
23-
ansible_ssh_pass: "ansible"
23+
ansible_password: "ansible"
2424
ntp_server1: "192.0.2.1"
2525
ntp_server2: "192.0.2.2"
2626
...

ntp_config.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
# NTP servers are defined and are valid IPv4 addresses.
1818
# This task uses the "assert" module as a way of integrating
1919
# testing within a playbook.
20-
- name: "TASK 1: Validate NTP server IP addresses"
20+
- name: "TASK 0: Validate NTP server IP addresses"
2121
assert:
2222
that:
2323
- "ntp_server1 is defined"
@@ -27,7 +27,7 @@
2727
msg: "Malformed input; please check ntp_server values"
2828

2929
# This is the second task. It logs into the Cisco IOS or
30-
# IOS-XE device using the "ios_config" module. The commands
30+
# IOS-XE device using the "ios_config" module. The 'lines'
3131
# specified within that module are passed to the router, and
3232
# the NTP server values are substituted using {{ }} syntax.
3333
# The previous task verified that these servers were valid,
@@ -36,9 +36,9 @@
3636
# feedback from the module, which provides us a list of which
3737
# commands needed to be added (between 0 and 4 in this case),
3838
# whether there were any failures, and more.
39-
- name: "TASK 2: Apply NTP updates"
39+
- name: "TASK 1: Apply NTP updates"
4040
ios_config:
41-
commands:
41+
lines:
4242
- "ntp authenticate"
4343
- "ntp logging"
4444
- "ntp server {{ ntp_server1 }}"
@@ -54,7 +54,7 @@
5454
# be false when the registered variable from the previous task
5555
# does not define the "updates" subfield, which indicates no
5656
# changes were needed.
57-
- name: "TASK 3: Print changes if NTP config changed"
57+
- name: "TASK 2: Print changes if NTP config changed"
5858
debug:
5959
var: "ntp_updates.updates"
6060
when: "ntp_updates.updates is defined"

test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
# for future tests by removing the mock servers.
5454
- name: "TASK 3: Remove mock NTP servers"
5555
ios_config:
56-
commands:
56+
lines:
5757
- "no ntp server 203.0.113.1"
5858
- "no ntp server 203.0.113.2"
5959

0 commit comments

Comments
 (0)