|
|
|
---
|
|
|
|
- name: Install etckeeper
|
|
|
|
dnf: name={{ item }} state=present
|
|
|
|
with_items:
|
|
|
|
- git
|
|
|
|
- etckeeper
|
|
|
|
when: ansible_distribution == 'Fedora'
|
|
|
|
- name: Install etckeeper
|
|
|
|
apt: name={{ item }} state=present
|
|
|
|
with_items:
|
|
|
|
- git
|
|
|
|
- etckeeper
|
|
|
|
when: ansible_distribution == 'Debian' or ansible_distribution == 'Ubuntu'
|
|
|
|
|
|
|
|
|
|
|
|
- block:
|
|
|
|
- set_fact: highlevel_package_manager='dnf'
|
|
|
|
- set_fact: lowlevel_package_manager='rpm'
|
|
|
|
when: ansible_distribution == 'Fedora'
|
|
|
|
- block:
|
|
|
|
- set_fact: highlevel_package_manager='apt'
|
|
|
|
- set_fact: lowlevel_package_manager='dpkg'
|
|
|
|
when: ansible_distribution == 'Debian' or ansible_distribution == 'Ubuntu'
|
|
|
|
- name: "etckeeper: Configure"
|
|
|
|
template: src=etckeeper.conf.j2
|
|
|
|
dest=/etc/etckeeper/etckeeper.conf
|
|
|
|
|
|
|
|
|
|
|
|
- file: path=/etc/.bzr state=absent
|
|
|
|
- name: "etckeeper: Initialize"
|
|
|
|
command: etckeeper init creates=/etc/.git/
|