Prakhar Srivastava
2018-11-14 a540411df7b373c71f936b4a727d571e9956026f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
- name: Remove ansbile-2.7.1
  yum:
   name: ansible
   state: absent
 
- name: Install pip
  yum:
   name: 
    - python-pip 
    - gcc
   state: latest
 
- name: Install ansible-2.7.0
  pip:
   name: ansible==2.7.0
- name: Download Tower Setup file
  unarchive:
    src: https://releases.ansible.com/ansible-tower/setup/ansible-tower-setup-latest.tar.gz
    dest: /root/
    remote_src: yes 
  tags:
    - install-tower
 
 
- name: Remove directory if it exists
  file:
   path: /root/ansible-tower-setup-latest
   state: absent
 
- name: Rename the ansible tower setup directory name
  shell: mv /root/ansible-tower-setup-* /root/ansible-tower-setup-latest
 
 
- name: Create template file
  template:
    src: tower_template_inventory.j2
    dest: /root/ansible-tower-setup-latest/inventory
  tags:
    - install-tower
 
- name: Run Ansible Tower setup
  shell: /root/ansible-tower-setup-latest/setup.sh
  async: 3600
  poll: 36
  tags:
    - install-tower