1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071 |
- ---
- - name: Install dependencies
- become: true
- apt:
- pkg:
- - git
- - build-essential
- - make
- - name: Clone babeld git repo
- git:
- repo: https://github.com/jech/babeld.git
- dest: "/home/{{ system.user }}/babeld"
- clone: true
- force: true
- register: git_clone
- - name: Build babeld
- community.general.make:
- chdir: "/home/{{ system.user }}/babeld"
- params:
- NUM_THREADS: "{{ ansible_processor_vcpus }}"
- when: git_clone is changed
- - name: Install babeld
- become: true
- community.general.make:
- chdir: "/home/{{ system.user }}/babeld"
- target: install
- when: git_clone is changed
- - name: Install default parameter
- become: true
- copy:
- src: files/default-babeld
- dest: /etc/default/babeld
- mode: 0644
- - name: Install init script
- become: true
- copy:
- src: files/init-babeld
- dest: /etc/init.d/babeld
- mode: +x
- - name: Install logrotate settings
- become: true
- copy:
- src: files/logrotate-babeld
- dest: /etc/logrotate.d/babeld
- mode: 0644
- - name: Install Systemd unit
- become: true
- copy:
- src: files/systemd-babeld
- dest: /etc/systemd/system/babeld.service
- mode: 0644
- - name: Reload systemd
- become: true
- systemd:
- daemon_reload: true
- - name: Create empty babeld configuration file
- become: true
- file:
- path: /etc/babeld.conf
- state: touch
- mode: 0644
|