Make playbooks compatible with FreeBSD
This commit is contained in:
parent
e5dac48410
commit
824d3178c0
4 changed files with 11 additions and 5 deletions
|
@ -4,4 +4,5 @@
|
|||
- include: freebsd.yml
|
||||
when: ansible_distribution == 'FreeBSD'
|
||||
- include: modules.yml
|
||||
when: ansible_system == 'Linux'
|
||||
- include: ssh.yml
|
||||
|
|
|
@ -8,13 +8,13 @@
|
|||
register: changed_ssh_config
|
||||
- name: Enable SSH
|
||||
become: true
|
||||
systemd:
|
||||
name: ssh.service
|
||||
service:
|
||||
name: ssh
|
||||
enabled: yes
|
||||
state: started
|
||||
- name: Restart SSH
|
||||
become: true
|
||||
systemd:
|
||||
name: ssh.service
|
||||
service:
|
||||
name: ssh
|
||||
state: restarted
|
||||
when: changed_ssh_config.changed == true
|
||||
|
|
|
@ -10,12 +10,14 @@
|
|||
recurse: yes
|
||||
depth: 3
|
||||
register: emacs_service_files
|
||||
when: ansible_system == 'Linux'
|
||||
- name: Create Emacs user service
|
||||
copy:
|
||||
src: '{{ item.path }}'
|
||||
dest: "{{ ansible_env.HOME }}/.config/systemd/user/emacs.service"
|
||||
remote_src: yes
|
||||
loop: '{{ emacs_service_files.files }}'
|
||||
when: ansible_system == 'Linux'
|
||||
- name: Start Emacs user service
|
||||
systemd:
|
||||
name: emacs.service
|
||||
|
@ -23,6 +25,7 @@
|
|||
daemon_reload: yes
|
||||
enabled: yes
|
||||
state: started
|
||||
when: ansible_system == 'Linux'
|
||||
- name: Create Emacs client launcher
|
||||
copy:
|
||||
src: "{{ ansible_env.HOME }}/.emacs.d/emacs-client.desktop"
|
||||
|
|
|
@ -3,7 +3,9 @@
|
|||
become: true
|
||||
copy:
|
||||
src: mate-acp.layout
|
||||
dest: /usr/share/mate-panel/layouts/acp.layout
|
||||
dest: "{{ prefix }}/share/mate-panel/layouts/acp.layout"
|
||||
vars:
|
||||
prefix: "{{ '/usr/local' if ansible_distribution == 'FreeBSD' else '/usr' }}"
|
||||
- name: Set default panel layout
|
||||
dconf:
|
||||
key: /org/mate/panel/general/default-layout
|
||||
|
|
Loading…
Reference in a new issue