main.yaml 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. ---
  2. - name: install some useful packages
  3. yum: name={{ item }}
  4. with_items:
  5. - git
  6. - python-pip
  7. - unzip
  8. - python-psphere
  9. - ansible
  10. - telnet
  11. - ack
  12. - name: download Tower setup
  13. #get_url: url=http://releases.ansible.com/ansible-tower/setup/ansible-tower-setup-{{tower_version}}.tar.gz
  14. get_url: url=http://releases.ansible.com/ansible-tower/setup/ansible-tower-setup-2.1.1.tar.gz
  15. dest=/opt/ force=yes
  16. #- name: extract Tower
  17. # unarchive: src=/opt/ansible-tower-setup-2.1.1.tar.gz dest=/opt copy=no
  18. #
  19. #- name: copy tower_setup_conf.yml
  20. # copy: src=tower_setup_conf.yml dest=/opt/ansible-tower-setup-2.1.1 owner=root group=root mode=0644
  21. #
  22. #- name: copy inventory
  23. # copy: src=inventory dest=/opt/ansible-tower-setup-2.1.1 owner=root group=root mode=0644
  24. - name: run the Tower installer
  25. command: chdir=/opt/ansible-tower-setup-2.1.1 creates=/etc/awx/settings.py ./setup.sh
  26. - name: Open firewalld port for http
  27. firewalld: port=80/tcp permanent=true state=enabled
  28. - name: Open firewalld port for https
  29. firewalld: port=443/tcp permanent=true state=enabled
  30. - name: Open firewalld port for https
  31. firewalld: port=8080/tcp permanent=true state=enabled