You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
1.2 KiB

  1. ---
  2. ## Install and configure rudder-agent on debian/ubuntu node
  3. - name: add rudder repo key
  4. apt_key: url="https://www.rudder-project.org/apt-repos/rudder_apt_key.pub" state=present
  5. when: ansible_distribution == 'Debian' or ansible_distribution == 'Ubuntu'
  6. - name: add rudder repo url
  7. apt_repository:
  8. repo: 'deb http://www.rudder-project.org/apt-4.1/ {{ansible_distribution_release}} main'
  9. state: present
  10. filename: 'rudder'
  11. update_cache: yes
  12. when: ansible_distribution == 'Debian' or ansible_distribution == 'Ubuntu'
  13. - name: install rudder agent
  14. apt: pkg=rudder-agent state=present update_cache=yes
  15. when: ansible_distribution == 'Debian' or ansible_distribution == 'Ubuntu'
  16. - name: configure rudder server
  17. template: src=policy_server.dat.tpl dest=/var/rudder/cfengine-community/policy_server.dat
  18. when: ansible_distribution == 'Debian' or ansible_distribution == 'Ubuntu'
  19. notify:
  20. - rudder-start
  21. - agent-inventory
  22. - agent-run
  23. when: ansible_distribution == 'Debian' or ansible_distribution == 'Ubuntu'
  24. - fail: msg="You can now connect to your rudder server and allow new nodes"
  25. ignore_errors: yes
  26. when: ansible_distribution == 'Debian' or ansible_distribution == 'Ubuntu'