mirror of
https://github.com/geerlingguy/ansible-role-ansible.git
synced 2024-11-22 11:35:11 +01:00
Specific role for debian (#4)
* Added specific role for Debian using backports repository * Moved ubuntu to specific file * Changed ansible_os_family to ansible_distribution for Debian/Ubuntu. Fixed my mistake where setup-Ubuntu.yml was a setup-RedHat copy
This commit is contained in:
parent
bebd370b83
commit
2828125e67
@ -3,5 +3,8 @@
|
||||
- include: setup-RedHat.yml
|
||||
when: ansible_os_family == 'RedHat'
|
||||
|
||||
- include: setup-Ubuntu.yml
|
||||
when: ansible_distribution == 'Ubuntu'
|
||||
|
||||
- include: setup-Debian.yml
|
||||
when: ansible_os_family == 'Debian'
|
||||
when: ansible_distribution == 'Debian'
|
||||
|
@ -1,9 +1,9 @@
|
||||
---
|
||||
- name: Add ansible repository.
|
||||
apt_repository: repo='ppa:ansible/ansible'
|
||||
- name: Enable Backports repository
|
||||
apt_repository: repo='deb http://ftp.debian.org/debian {{ansible_distribution_release}}-backports main' state=present filename={{ansible_distribution_release}}_backports
|
||||
|
||||
- name: Update apt cache.
|
||||
apt: update_cache=yes cache_valid_time=86400
|
||||
|
||||
- name: Install Ansible.
|
||||
apt: name=ansible state=installed
|
||||
apt: name=ansible state=installed default_release={{ansible_distribution_release}}-backports
|
||||
|
9
tasks/setup-Ubuntu.yml
Normal file
9
tasks/setup-Ubuntu.yml
Normal file
@ -0,0 +1,9 @@
|
||||
---
|
||||
- name: Add ansible repository.
|
||||
apt_repository: repo='ppa:ansible/ansible'
|
||||
|
||||
- name: Update apt cache.
|
||||
apt: update_cache=yes cache_valid_time=86400
|
||||
|
||||
- name: Install Ansible.
|
||||
apt: name=ansible state=installed
|
Loading…
Reference in New Issue
Block a user