main.yml 940 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. ---
  2. ## https://pve.proxmox.com/wiki/Linux_Container#_guest_operating_system_configuration
  3. - name: Create /etc/.pve-ignore.hosts
  4. file:
  5. path: /etc/.pve-ignore.hosts
  6. state: touch
  7. - name: Set dns domain in /etc/hosts
  8. lineinfile:
  9. dest=/etc/hosts
  10. regexp='127.0.1.1.*'
  11. line="127.0.1.1 {{ansible_hostname }}.{{ ansible_dns.domain }} {{ ansible_hostname }}"
  12. state=present
  13. ######################
  14. - name: install the puppet rpm from a remote repo
  15. apt:
  16. deb: https://apt.puppet.com/puppet7-release-{{ ansible_distribution_release }}.deb
  17. state: present
  18. - name: Install puppet
  19. apt:
  20. name: ['puppet-agent']
  21. update_cache: yes
  22. - name: Start puppet
  23. systemd:
  24. name: puppet
  25. state: started
  26. - name: Enable puppet
  27. systemd:
  28. name: puppet
  29. enabled: yes
  30. - name: set puppet server
  31. shell: /opt/puppetlabs/bin/puppet config set server 'puppet.erdo.intranet' --section main