mirror of
https://pagure.io/fedora-infra/ansible.git
synced 2026-04-24 10:31:56 +08:00
38 lines
988 B
YAML
38 lines
988 B
YAML
---
|
|
- name: set hostname
|
|
hostname: name={{ hostname }}
|
|
when: hostname is defined
|
|
|
|
- name: install basic packages
|
|
action: "{{ ansible_pkg_mgr }} name={{ item }} state=installed"
|
|
with_items:
|
|
- vim
|
|
- tmux
|
|
- wget
|
|
- git
|
|
- net-tools
|
|
- tree
|
|
|
|
- name: install yum-utils when using yum
|
|
yum: name=yum-utils state=installed
|
|
when: ansible_pkg_mgr == "yum"
|
|
|
|
- name: enable rhel7 repos
|
|
command: yum-config-manager --enable {{ item }}
|
|
with_items:
|
|
- rhel-7-server-optional-rpms
|
|
- rhel-7-server-extras-rpms
|
|
when: ansible_distribution == 'RedHat' and ansible_distribution_major_version == '7'
|
|
|
|
- name: enable epel7
|
|
yum: name={{ epel7_url }} state=installed
|
|
when: ansible_os_family == 'RedHat' and ansible_distribution_major_version == '7'
|
|
|
|
- name: install firewalld
|
|
action: "{{ ansible_pkg_mgr }} name=firewalld state=installed"
|
|
when: osbs_manage_firewalld
|
|
|
|
- name: enable firewalld
|
|
service: name=firewalld state=started enabled=yes
|
|
when: osbs_manage_firewalld
|