main.yml 977 Bytes
Newer Older
Aleksey Shirokih's avatar
Aleksey Shirokih committed
1
2
3
4
5
6
---
- name: Set proxy for yum
  lineinfile:
    dest: /etc/yum.conf
    regexp: "^proxy=.*"
    line: "proxy={{ http_proxy }}"
Aleksey Shirokih's avatar
Aleksey Shirokih committed
7
8
  when:
    - http_proxy is defined
EKbfh's avatar
EKbfh committed
9
    - http_proxy | length
Aleksey Shirokih's avatar
Aleksey Shirokih committed
10
  become: "True"
Aleksey Shirokih's avatar
Aleksey Shirokih committed
11
12
13
14
  tags:
    - config

- name: Disable selinux
Aleksey Shirokih's avatar
Aleksey Shirokih committed
15
  become: "True"
Aleksey Shirokih's avatar
Aleksey Shirokih committed
16
17
  selinux:
    policy: targeted
Aleksey Shirokih's avatar
Aleksey Shirokih committed
18
    state: disabled
Aleksey Shirokih's avatar
Aleksey Shirokih committed
19

20
21
22
- name: register rhel instances
  include_role:
    name: rhel-register
23
24
    apply:
      become: "True"
25
26
27
28
29
30
  when:
    - has_svc_rhel_register is defined
    - has_svc_rhel_register
    - rhel_register_rhel_subscription_password
    - rhel_register_rhel_subscription_username

Aleksey Shirokih's avatar
Aleksey Shirokih committed
31
- name: Install Rhel system packages pre
Aleksey Shirokih's avatar
Aleksey Shirokih committed
32
  become: "True"
Aleksey Shirokih's avatar
Aleksey Shirokih committed
33
  yum:
34
    name: "{{ packages }}"
Aleksey Shirokih's avatar
Aleksey Shirokih committed
35
    state: present
Aleksey Shirokih's avatar
Aleksey Shirokih committed
36
    update_cache: "True"
37
38
39
40
  vars:
    packages:
      - unzip
      - ca-certificates
EKbfh's avatar
EKbfh committed
41
      - gcc-c++
Aleksey Shirokih's avatar
Aleksey Shirokih committed
42
  environment:
EKbfh's avatar
EKbfh committed
43
44
    https_proxy: "{{ http_proxy }}"
    http_proxy: "{{ http_proxy }}"
Aleksey Shirokih's avatar
Aleksey Shirokih committed
45
  tags:
46
47
48
49
    - requirements

- include_tasks: "firewall.yml"
  tags:
Aleksey Shirokih's avatar
Aleksey Shirokih committed
50
    - firewall