так:
                  
                  
                  - name: Restart Crond
                  
                  
                    block:
                  
                  
                    - name: get facts about system services
                  
                  
                      service_facts:
                  
                  
                    - name: trigger crond restart
                  
                  
                      systemd:
                  
                  
                        name: 'crond'
                  
                  
                        enabled: yes
                  
                  
                        state: 'restarted'
                  
                  
                    when: '"crond" in services'
                  
                  
                  
                  
                  
                  При попытке вызова ансибл падает с ошибкой ERROR! The requested handler 'Restart Crond' was not found in either the main handlers list nor in the listening handlers list
                  
                  
                  Хендлер вызываете из роли, лежит в handlers/main.yml
                  
                  
                  
                  
                  
                  Где я не прав?
                  
                  
                
Сам вызов хенлера из таски: - name: set timezone timezone: name: '{{ timezone }}' notify: 'Restart Crond'
Обсуждают сегодня