cisco.ios.ios_ntp_global module – Resource module to configure NTP.
Note
This module is part of the cisco.ios collection (version 9.0.3).
You might already have this collection installed if you are using the ansible
package.
It is not included in ansible-core
.
To check whether it is installed, run ansible-galaxy collection list
.
To install it, use: ansible-galaxy collection install cisco.ios
.
To use it in a playbook, specify: cisco.ios.ios_ntp_global
.
New in cisco.ios 2.5.0
Synopsis
This module provides declarative management of ntp on Cisco IOS devices.
Parameters
Parameter |
Comments |
---|---|
A dictionary of ntp options |
|
Control NTP access |
|
Provide full access |
|
name or number of access list |
|
ipv4 access lists (Default not idempotent) Choices:
|
|
ipv6 access lists (Default not idempotent) Choices:
|
|
Send a Kiss-o-Death packet for failing peers Choices:
|
|
Allow only control queries |
|
name or number of access list |
|
ipv4 access lists (Default not idempotent) Choices:
|
|
ipv6 access lists (Default not idempotent) Choices:
|
|
Send a Kiss-o-Death packet for failing peers Choices:
|
|
Provide server and query access |
|
name or number of access list |
|
ipv4 access lists (Default not idempotent) Choices:
|
|
ipv6 access lists (Default not idempotent) Choices:
|
|
Send a Kiss-o-Death packet for failing peers Choices:
|
|
Provide only server access |
|
name or number of access list |
|
ipv4 access lists (Default not idempotent) Choices:
|
|
ipv6 access lists (Default not idempotent) Choices:
|
|
Send a Kiss-o-Death packet for failing peers Choices:
|
|
Allow processing of packets |
|
Allow processing control mode packets |
|
Rate-limit delay. |
|
Allow processing private mode packets Choices:
|
|
Authenticate time sources Choices:
|
|
Authentication key for trusted time sources |
|
Authentication type |
|
Authentication key encryption type |
|
Key number |
|
Password |
|
Estimated round-trip delay |
|
Length of hardware clock tick, clock period in 2^-32 seconds |
|
Enable NTP message logging Choices:
|
|
Act as NTP master clock |
|
Enable master clock Choices:
|
|
Stratum number |
|
Set maximum number of associations |
|
Maximum Distance for synchronization |
|
Minimum distance to consider for clockhop |
|
Threshold Stratum for orphan mode |
|
Reject time updates > panic threshold (default 1000Sec) Choices:
|
|
NTP passive mode Choices:
|
|
Configure NTP peer |
|
Send a burst when peer is reachable (Default) Choices:
|
|
Send a burst when peer is unreachable (Default) Choices:
|
|
Configure peer authentication key |
|
Maximum poll interval Poll value in Log2 |
|
Minimum poll interval Poll value in Log2 |
|
Disable rapid sync at startup Choices:
|
|
ipv4/ipv6 address or hostname of the peer |
|
Prefer this peer when possible Choices:
|
|
Interface for source address |
|
Use IP for DNS resolution Choices:
|
|
Use IPv6 for DNS resolution Choices:
|
|
Configure NTP version |
|
VPN Routing/Forwarding Information |
|
Configure NTP server |
|
Send a burst when peer is reachable (Default) Choices:
|
|
Send a burst when peer is unreachable (Default) Choices:
|
|
Configure peer authentication key |
|
Maximum poll interval Poll value in Log2 |
|
Minimum poll interval Poll value in Log2 |
|
Disable rapid sync at startup Choices:
|
|
Prefer this peer when possible Choices:
|
|
ipv4/ipv6 address or hostname of the server |
|
Interface for source address |
|
Use IP for DNS resolution Choices:
|
|
Use IPv6 for DNS resolution Choices:
|
|
Configure NTP version |
|
VPN Routing/Forwarding Information |
|
Configure interface for source address |
|
Key numbers for trusted time sources |
|
End key number |
|
Start / key number |
|
Periodically update calendar with NTP time Choices:
|
|
This option is used only with state parsed. The value of this option should be the output received from the IOS device by executing the command show running-config | section ^ntp. The state parsed reads the configuration from |
|
The state the configuration should be left in The states rendered, gathered and parsed does not perform any change on the device. The state rendered will transform the configuration in The states replaced and overridden have identical behaviour for this module. The state gathered will fetch the running configuration from device and transform it into structured data in the format as per the resource module argspec and the value is returned in the gathered key within the result. The state parsed reads the configuration from Choices:
|
Notes
Note
Tested against Cisco IOSXE Version 17.3 on CML.
This module works with connection
network_cli
.
Examples
# Using state: merged
# Before state:
# -------------
# router-ios#show running-config | section ^ntp
# --------------------- EMPTY -----------------
# Merged play:
# ------------
- name: Apply the provided configuration
cisco.ios.ios_ntp_global:
config:
access_group:
peer:
- access_list: DHCP-Server
ipv4: true
kod: true
- access_list: preauth_ipv6_acl
ipv6: true
kod: true
- access_list: "2"
kod: true
query_only:
- access_list: "10"
allow:
control:
rate_limit: 4
private: true
authenticate: true
authentication_keys:
- algorithm: md5
encryption: 22
id: 2
key: SomeSecurePassword
broadcast_delay: 22
clock_period: 5
logging: true
master:
stratum: 4
max_associations: 34
max_distance: 3
min_distance: 10
orphan: 4
panic_update: true
peers:
- peer: 172.16.1.10
version: 2
- key: 2
minpoll: 5
peer: 172.16.1.11
prefer: true
version: 2
- peer: checkPeerDomainIpv4.com
prefer: true
use_ipv4: true
- peer: checkPeerDomainIpv6.com
use_ipv6: true
- peer: testPeerDomainIpv6.com
prefer: true
use_ipv6: true
servers:
- server: 172.16.1.12
version: 2
- server: checkServerDomainIpv6.com
use_ipv6: true
- server: 172.16.1.13
source: GigabitEthernet0/1
source: GigabitEthernet0/1
trusted_keys:
- range_end: 3
range_start: 3
- range_start: 21
state: merged
# Commands Fired:
# ---------------
# "commands": [
# "ntp allow mode control 4",
# "ntp allow mode private",
# "ntp authenticate",
# "ntp broadcastdelay 22",
# "ntp clock-period 5",
# "ntp logging",
# "ntp master 4",
# "ntp max-associations 34",
# "ntp maxdistance 3",
# "ntp mindistance 10",
# "ntp orphan 4",
# "ntp panic update",
# "ntp source GigabitEthernet0/1",
# "ntp access-group ipv4 peer DHCP-Server kod",
# "ntp access-group ipv6 peer preauth_ipv6_acl kod",
# "ntp access-group peer 2 kod",
# "ntp access-group query-only 10",
# "ntp authentication-key 2 md5 SomeSecurePassword 22",
# "ntp peer 172.16.1.10 version 2",
# "ntp peer 172.16.1.11 key 2 minpoll 5 prefer version 2",
# "ntp peer ip checkPeerDomainIpv4.com prefer",
# "ntp peer ipv6 checkPeerDomainIpv6.com",
# "ntp peer ipv6 testPeerDomainIpv6.com prefer",
# "ntp server 172.16.1.12 version 2",
# "ntp server ipv6 checkServerDomainIpv6.com",
# "ntp server 172.16.1.13 source GigabitEthernet0/1",
# "ntp trusted-key 3 - 3",
# "ntp trusted-key 21"
# ],
# After state:
# ------------
# router-ios#show running-config | section ^ntp
# ntp max-associations 34
# ntp logging
# ntp allow mode control 4
# ntp panic update
# ntp authentication-key 2 md5 0635002C497D0C1A1005173B0D17393C2B3A37 7
# ntp authenticate
# ntp trusted-key 3 - 3
# ntp trusted-key 21
# ntp orphan 4
# ntp mindistance 10
# ntp maxdistance 3
# ntp broadcastdelay 22
# ntp source GigabitEthernet0/1
# ntp access-group peer 2 kod
# ntp access-group ipv6 peer preauth_ipv6_acl kod
# ntp master 4
# ntp peer 172.16.1.10 version 2
# ntp peer 172.16.1.11 key 2 minpoll 5 prefer version 2
# ntp server 172.16.1.12 version 2
# ntp server 172.16.1.13 source GigabitEthernet0/1
# ntp peer ip checkPeerDomainIpv4.com prefer
# ntp peer ipv6 checkPeerDomainIpv6.com
# ntp peer ipv6 testPeerDomainIpv6.com prefer
# ntp server ipv6 checkServerDomainIpv6.com
# Using state: deleted
# Before state:
# -------------
# router-ios#show running-config | section ^ntp
# ntp max-associations 34
# ntp logging
# ntp allow mode control 4
# ntp panic update
# ntp authentication-key 2 md5 0635002C497D0C1A1005173B0D17393C2B3A37 7
# ntp authenticate
# ntp trusted-key 3 - 3
# ntp trusted-key 21
# ntp orphan 4
# ntp mindistance 10
# ntp maxdistance 3
# ntp broadcastdelay 22
# ntp source GigabitEthernet0/1
# ntp access-group peer 2 kod
# ntp access-group ipv6 peer preauth_ipv6_acl kod
# ntp master 4
# ntp peer 172.16.1.10 version 2
# ntp peer 172.16.1.11 key 2 minpoll 5 prefer version 2
# ntp server 172.16.1.12 version 2
# ntp server 172.16.1.13 source GigabitEthernet0/1
# ntp peer ip checkPeerDomainIpv4.com prefer
# ntp peer ipv6 checkPeerDomainIpv6.com
# ntp peer ipv6 testPeerDomainIpv6.com prefer
# ntp server ipv6 checkServerDomainIpv6.com
# Deleted play:
# -------------
- name: Remove all existing configuration
cisco.ios.ios_ntp_global:
state: deleted
# Commands Fired:
# ---------------
# "commands": [
# "no ntp allow mode control 4",
# "no ntp authenticate",
# "no ntp broadcastdelay 22",
# "no ntp logging",
# "no ntp master 4",
# "no ntp max-associations 34",
# "no ntp maxdistance 3",
# "no ntp mindistance 10",
# "no ntp orphan 4",
# "no ntp panic update",
# "no ntp source GigabitEthernet0/1",
# "no ntp access-group peer 2 kod",
# "no ntp access-group ipv6 peer preauth_ipv6_acl kod",
# "no ntp authentication-key 2 md5 0635002C497D0C1A1005173B0D17393C2B3A37 7",
# "no ntp peer 172.16.1.10 version 2",
# "no ntp peer 172.16.1.11 key 2 minpoll 5 prefer version 2",
# "no ntp peer ip checkPeerDomainIpv4.com prefer",
# "no ntp peer ipv6 checkPeerDomainIpv6.com",
# "no ntp peer ipv6 testPeerDomainIpv6.com prefer",
# "no ntp server 172.16.1.12 version 2",
# "no ntp server 172.16.1.13 source GigabitEthernet0/1",
# "no ntp server ipv6 checkServerDomainIpv6.com",
# "no ntp trusted-key 21",
# "no ntp trusted-key 3 - 3"
# ],
# After state:
# ------------
# router-ios#show running-config | section ^ntp
# --------------------- EMPTY -----------------
# Using state: overridden
# Before state:
# -------------
# router-ios#show running-config | section ^ntp
# ntp panic update
# ntp authentication-key 2 md5 00371C0B01680E051A33497E080A16001D1908 7
# ntp authenticate
# ntp trusted-key 3 - 4
# ntp trusted-key 21
# ntp source GigabitEthernet0/1
# ntp peer 172.16.1.10 version 2
# ntp server 172.16.1.12 version 2
# ntp peer ip checkPeerDomainIpv4.com prefer
# ntp server ipv6 checkServerDomainIpv6.com
# Overridden play:
# ----------------
- name: Override commands with provided configuration
cisco.ios.ios_ntp_global:
config:
peers:
- peer: ipv6DomainNew.com
use_ipv6: true
- peer: 172.16.1.100
prefer: true
use_ipv4: true
access_group:
peer:
- access_list: DHCP-Server
ipv6: true
state: overridden
# Commands Fired:
# ---------------
# "commands": [
# "no ntp authenticate",
# "no ntp panic update",
# "no ntp source GigabitEthernet0/1",
# "ntp access-group ipv6 peer DHCP-Server",
# "no ntp authentication-key 2 md5 00371C0B01680E051A33497E080A16001D1908 7",
# "ntp peer ipv6 ipv6DomainNew.com",
# "ntp peer 172.16.1.100 prefer",
# "no ntp peer 172.16.1.10 version 2",
# "no ntp peer ip checkPeerDomainIpv4.com prefer",
# "no ntp server 172.16.1.12 version 2",
# "no ntp server ipv6 checkServerDomainIpv6.com",
# "no ntp trusted-key 21",
# "no ntp trusted-key 3 - 4"
# ],
# After state:
# ------------
# router-ios#show running-config | section ^ntp
# ntp access-group ipv6 peer DHCP-Server
# ntp peer ipv6 ipv6DomainNew.com
# ntp peer 172.16.1.100 prefer
# Using state: replaced
# Before state:
# -------------
# router-ios#show running-config | section ^ntp
# ntp access-group ipv6 peer DHCP-Server
# ntp peer ipv6 ipv6DomainNew.com
# ntp peer 172.16.1.100 prefer
# Replaced play:
# --------------
- name: Replace commands with provided configuration
cisco.ios.ios_ntp_global:
config:
broadcast_delay: 22
clock_period: 5
logging: true
master:
stratum: 4
max_associations: 34
max_distance: 3
min_distance: 10
orphan: 4
state: replaced
# Commands Fired:
# ---------------
# "commands": [
# "ntp broadcastdelay 22",
# "ntp clock-period 5",
# "ntp logging",
# "ntp master 4",
# "ntp max-associations 34",
# "ntp maxdistance 3",
# "ntp mindistance 10",
# "ntp orphan 4",
# "no ntp access-group ipv6 peer DHCP-Server",
# "no ntp peer 172.16.1.100 prefer",
# "no ntp peer ipv6 ipv6DomainNew.com"
# ],
# After state:
# ------------
# router-ios#show running-config | section ^ntp
# ntp max-associations 34
# ntp logging
# ntp orphan 4
# ntp mindistance 10
# ntp maxdistance 3
# ntp broadcastdelay 22
# ntp master 4
# Using state: gathered
# Before state:
# -------------
# router-ios#show running-config | section ^ntp
# ntp max-associations 34
# ntp logging
# ntp allow mode control 4
# ntp panic update
# ntp authentication-key 2 md5 0635002C497D0C1A1005173B0D17393C2B3A37 7
# ntp authenticate
# ntp trusted-key 3 - 3
# ntp trusted-key 21
# ntp orphan 4
# ntp mindistance 10
# ntp maxdistance 3
# ntp broadcastdelay 22
# ntp source GigabitEthernet0/1
# ntp access-group peer 2 kod
# ntp access-group ipv6 peer preauth_ipv6_acl kod
# ntp master 4
# ntp update-calendar
# ntp peer 172.16.1.10 version 2
# ntp peer 172.16.1.11 key 2 minpoll 5 prefer version 2
# ntp server 172.16.1.12 version 2
# ntp server 172.16.1.13 source GigabitEthernet0/1
# ntp peer ip checkPeerDomainIpv4.com prefer
# ntp peer ipv6 checkPeerDomainIpv6.com
# ntp peer ipv6 testPeerDomainIpv6.com prefer
# ntp server ipv6 checkServerDomainIpv6.com
# Gathered play:
# --------------
- name: Gather listed ntp config
cisco.ios.ios_ntp_global:
state: gathered
# Module Execution Result:
# ------------------------
# "gathered": {
# "access_group": {
# "peer": [
# {
# "access_list": "2",
# "kod": true
# },
# {
# "access_list": "preauth_ipv6_acl",
# "ipv6": true,
# "kod": true
# }
# ]
# },
# "allow": {
# "control": {
# "rate_limit": 4
# }
# },
# "authenticate": true,
# "authentication_keys": [
# {
# "algorithm": "md5",
# "encryption": 7,
# "id": 2,
# "key": "0635002C497D0C1A1005173B0D17393C2B3A37"
# }
# ],
# "broadcast_delay": 22,
# "logging": true,
# "master": {
# "stratum": 4
# },
# "max_associations": 34,
# "max_distance": 3,
# "min_distance": 10,
# "orphan": 4,
# "panic_update": true,
# "peers": [
# {
# "peer": "172.16.1.10",
# "version": 2
# },
# {
# "key": 2,
# "minpoll": 5,
# "peer": "172.16.1.11",
# "prefer": true,
# "version": 2
# },
# {
# "peer": "checkPeerDomainIpv4.com",
# "prefer": true,
# "use_ipv4": true
# },
# {
# "peer": "checkPeerDomainIpv6.com",
# "use_ipv6": true
# },
# {
# "peer": "testPeerDomainIpv6.com",
# "prefer": true,
# "use_ipv6": true
# }
# ],
# "servers": [
# {
# "server": "172.16.1.12",
# "version": 2
# },
# {
# "server": "172.16.1.13",
# "source": "GigabitEthernet0/1"
# },
# {
# "server": "checkServerDomainIpv6.com",
# "use_ipv6": true
# }
# ],
# "source": "GigabitEthernet0/1",
# "trusted_keys": [
# {
# "range_start": 21
# },
# {
# "range_end": 3,
# "range_start": 3
# }
# ],
# "update_calendar": true
# },
# After state:
# -------------
# router-ios#show running-config | section ^ntp
# ntp max-associations 34
# ntp logging
# ntp allow mode control 4
# ntp panic update
# ntp authentication-key 2 md5 0635002C497D0C1A1005173B0D17393C2B3A37 7
# ntp authenticate
# ntp trusted-key 3 - 3
# ntp trusted-key 21
# ntp orphan 4
# ntp mindistance 10
# ntp maxdistance 3
# ntp broadcastdelay 22
# ntp source GigabitEthernet0/1
# ntp access-group peer 2 kod
# ntp access-group ipv6 peer preauth_ipv6_acl kod
# ntp master 4
# ntp update-calendar
# ntp peer 172.16.1.10 version 2
# ntp peer 172.16.1.11 key 2 minpoll 5 prefer version 2
# ntp server 172.16.1.12 version 2
# ntp server 172.16.1.13 source GigabitEthernet0/1
# ntp peer ip checkPeerDomainIpv4.com prefer
# ntp peer ipv6 checkPeerDomainIpv6.com
# ntp peer ipv6 testPeerDomainIpv6.com prefer
# ntp server ipv6 checkServerDomainIpv6.com
# Using state: rendered
# Rendered play:
# --------------
- name: Render the commands for provided configuration
cisco.ios.ios_ntp_global:
config:
access_group:
peer:
- access_list: DHCP-Server
ipv4: true
kod: true
- access_list: preauth_ipv6_acl
ipv6: true
kod: true
- access_list: "2"
kod: true
query_only:
- access_list: "10"
allow:
control:
rate_limit: 4
private: true
authenticate: true
authentication_keys:
- algorithm: md5
encryption: 22
id: 2
key: SomeSecurePassword
broadcast_delay: 22
clock_period: 5
logging: true
master:
stratum: 4
max_associations: 34
max_distance: 3
min_distance: 10
orphan: 4
panic_update: true
peers:
- peer: 172.16.1.10
version: 2
- key: 2
minpoll: 5
peer: 172.16.1.11
prefer: true
version: 2
- peer: checkPeerDomainIpv4.com
prefer: true
use_ipv4: true
- peer: checkPeerDomainIpv6.com
use_ipv6: true
- peer: testPeerDomainIpv6.com
prefer: true
use_ipv6: true
servers:
- server: 172.16.1.12
version: 2
- server: checkServerDomainIpv6.com
use_ipv6: true
- server: 172.16.1.13
source: GigabitEthernet0/1
source: GigabitEthernet0/1
trusted_keys:
- range_end: 3
range_start: 10
- range_start: 21
update_calendar: true
state: rendered
# Module Execution Result:
# ------------------------
# "rendered": [
# "ntp allow mode control 4",
# "ntp allow mode private",
# "ntp authenticate",
# "ntp broadcastdelay 22",
# "ntp clock-period 5",
# "ntp logging",
# "ntp master 4",
# "ntp max-associations 34",
# "ntp maxdistance 3",
# "ntp mindistance 10",
# "ntp orphan 4",
# "ntp panic update",
# "ntp source GigabitEthernet0/1",
# "ntp update-calendar",
# "ntp access-group ipv4 peer DHCP-Server kod",
# "ntp access-group ipv6 peer preauth_ipv6_acl kod",
# "ntp access-group peer 2 kod",
# "ntp access-group query-only 10",
# "ntp authentication-key 2 md5 SomeSecurePassword 22",
# "ntp peer 172.16.1.10 version 2",
# "ntp peer 172.16.1.11 key 2 minpoll 5 prefer version 2",
# "ntp peer ip checkPeerDomainIpv4.com prefer",
# "ntp peer ipv6 checkPeerDomainIpv6.com",
# "ntp peer ipv6 testPeerDomainIpv6.com prefer",
# "ntp server 172.16.1.12 version 2",
# "ntp server ipv6 checkServerDomainIpv6.com",
# "ntp server 172.16.1.13 source GigabitEthernet0/1",
# "ntp trusted-key 3 - 3",
# "ntp trusted-key 21"
# ]
# Using state: parsed
# File: parsed.cfg
# ----------------
# ntp allow mode control 4
# ntp allow mode private
# ntp authenticate
# ntp broadcastdelay 22
# ntp clock-period 5
# ntp logging
# ntp master 4
# ntp max-associations 34
# ntp maxdistance 3
# ntp mindistance 10
# ntp orphan 4
# ntp panic update
# ntp source GigabitEthernet0/1
# ntp update-calendar
# ntp access-group ipv4 peer DHCP-Server kod
# ntp access-group ipv6 peer preauth_ipv6_acl kod
# ntp access-group peer 2 kod
# ntp access-group query-only 10
# ntp authentication-key 2 md5 SomeSecurePassword 22
# ntp peer 172.16.1.10 version 2
# ntp peer 172.16.1.11 key 2 minpoll 5 prefer version 2
# ntp peer ip checkPeerDomainIpv4.com prefer
# ntp peer ipv6 checkPeerDomainIpv6.com
# ntp peer ipv6 testPeerDomainIpv6.com prefer
# ntp server 172.16.1.12 version 2
# ntp server ipv6 checkServerDomainIpv6.com
# ntp server 172.16.1.13 source GigabitEthernet0/1
# ntp trusted-key 3 - 13
# ntp trusted-key 21
# Parsed play:
# ------------
- name: Parse the provided configuration with the existing running configuration
cisco.ios.ios_ntp_global:
running_config: "{{ lookup('file', 'parsed.cfg') }}"
state: parsed
# Module Execution Result:
# ------------------------
# "parsed": {
# "access_group": {
# "peer": [
# {
# "access_list": "2",
# "kod": true
# },
# {
# "access_list": "DHCP-Server",
# "ipv4": true,
# "kod": true
# },
# {
# "access_list": "preauth_ipv6_acl",
# "ipv6": true,
# "kod": true
# }
# ],
# "query_only": [
# {
# "access_list": "10"
# }
# ]
# },
# "allow": {
# "control": {
# "rate_limit": 4
# },
# "private": true
# },
# "authenticate": true,
# "authentication_keys": [
# {
# "algorithm": "md5",
# "encryption": 22,
# "id": 2,
# "key": "SomeSecurePassword"
# }
# ],
# "broadcast_delay": 22,
# "clock_period": 5,
# "logging": true,
# "master": {
# "stratum": 4
# },
# "max_associations": 34,
# "max_distance": 3,
# "min_distance": 10,
# "orphan": 4,
# "panic_update": true,
# "peers": [
# {
# "peer": "172.16.1.10",
# "version": 2
# },
# {
# "peer": "checkPeerDomainIpv6.com",
# "use_ipv6": true
# }
# ],
# "servers": [
# {
# "server": "172.16.1.12",
# "version": 2
# },
# {
# "server": "172.16.1.13",
# "source": "GigabitEthernet0/1"
# },
# {
# "server": "checkServerDomainIpv6.com",
# "use_ipv6": true
# }
# ],
# "source": "GigabitEthernet0/1",
# "trusted_keys": [
# {
# "range_start": 21
# },
# {
# "range_end": 13,
# "range_start": 3
# }
# ],
# "update_calendar": true
# }
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
The resulting configuration after module execution. Returned: when changed Sample: |
|
The configuration prior to the module execution. Returned: when state is Sample: |
|
The set of commands pushed to the remote device. Returned: when state is Sample: |
|
Facts about the network resource gathered from the remote device as structured data. Returned: when state is Sample: |
|
The device native config provided in running_config option parsed into structured data as per module argspec. Returned: when state is Sample: |
|
The provided configuration in the task rendered in device-native format (offline). Returned: when state is rendered Sample: |