ansible-role-common/tasks/main.yml

68 lines
1.3 KiB
YAML

---
# tasks file for common
- name: Update hostname
become: true
hostname:
name: '{{ hostname }}'
use: systemd
when: hostname and update_hostname == True
- name: Firewall
become: true
import_role:
name: geerlingguy.firewall
tags: firewall
when: not skip_firewall
- include: locales-debian.yml
become: true
when: ansible_facts['os_family'] == 'Debian'
- include: users.yml
become: true
- include: python-debian.yml
become: true
when: ansible_facts['os_family'] == 'Debian'
- name: Install basic packages (on Archlinux)
pacman:
name: "{{ packages }}"
state: present
update_cache: yes
vars:
packages:
- python-pip
- python-setuptools
- python-virtualenv
- htop
- tmux
become: yes
when: ansible_facts['os_family'] == 'Archlinux'
- name: Install basic packages (on Debian)
apt:
name: "{{ packages }}"
state: present
#update_cache: yes
vars:
packages:
- python3-pip
- python3-setuptools
- python3-virtualenv
- apt-transport-https
- htop
- tmux
become: yes
when: ansible_facts['os_family'] == 'Debian'
- name: Install Ansible
pip:
name: ansible=={{ ensure_ansible_version }}
when: enable_ansible
- name: Install tmuxp
pip:
name:
- tmuxp
state: present