motd.yml 569 B

1234567891011121314151617181920
  1. - name: motd yaml
  2. hosts: all
  3. become: true
  4. gather_facts: false
  5. tasks:
  6. - name: motd for proxy
  7. copy:
  8. dest: /etc/motd
  9. content: 'Wellcome to HAProxy server'
  10. when: inventory_hostname in groups['proxy']
  11. - name: motd for webservers
  12. copy:
  13. dest: /etc/motd
  14. content: 'Wellcome to Apache server'
  15. when: inventory_hostname in groups['webservers']
  16. - name: motd for websevers
  17. copy:
  18. dest: /etc/motd
  19. content: 'Wellcome to MySQL server'
  20. when: inventory_hostname in groups['database']