Check for desktops before copying files
This commit is contained in:
parent
46df7dfe71
commit
3b6f524a3a
2 changed files with 12 additions and 0 deletions
|
@ -13,8 +13,13 @@
|
||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
|
- name: Check for Gnome Shell
|
||||||
|
ansible.builtin.stat:
|
||||||
|
path: /usr/bin/gnome-shell
|
||||||
|
register: gnome_shell
|
||||||
- name: Copy GNOME settings reset script
|
- name: Copy GNOME settings reset script
|
||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
src: gnome-setup.sh
|
src: gnome-setup.sh
|
||||||
dest: "{{ ansible_env.HOME }}/.local/bin/reset-gnome-setup"
|
dest: "{{ ansible_env.HOME }}/.local/bin/reset-gnome-setup"
|
||||||
mode: '0755'
|
mode: '0755'
|
||||||
|
when: gnome_shell.stat.exists
|
||||||
|
|
|
@ -13,10 +13,15 @@
|
||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
|
- name: Check for Mate Session
|
||||||
|
ansible.builtin.stat:
|
||||||
|
path: /usr/bin/mate-session
|
||||||
|
register: mate_session
|
||||||
- name: Create MATE layouts directory
|
- name: Create MATE layouts directory
|
||||||
ansible.builtin.file:
|
ansible.builtin.file:
|
||||||
path: "{{ ansible_env.XDG_DATA_HOME }}/mate-panel/layouts"
|
path: "{{ ansible_env.XDG_DATA_HOME }}/mate-panel/layouts"
|
||||||
state: directory
|
state: directory
|
||||||
|
when: mate_session.stat.exists
|
||||||
- name: Copy MATE panel layout
|
- name: Copy MATE panel layout
|
||||||
ansible.builtin.template:
|
ansible.builtin.template:
|
||||||
src: mate-acp.layout
|
src: mate-acp.layout
|
||||||
|
@ -24,8 +29,10 @@
|
||||||
vars:
|
vars:
|
||||||
prefix: "{{ '/usr' if ansible_system == 'Linux' else '/usr/pkg' if ansible_system == 'NetBSD' else '/usr/local' }}"
|
prefix: "{{ '/usr' if ansible_system == 'Linux' else '/usr/pkg' if ansible_system == 'NetBSD' else '/usr/local' }}"
|
||||||
esr: "{{ '-esr' if ansible_distribution == 'Debian' else '' }}"
|
esr: "{{ '-esr' if ansible_distribution == 'Debian' else '' }}"
|
||||||
|
when: mate_session.stat.exists
|
||||||
- name: Copy MATE Clock reset script
|
- name: Copy MATE Clock reset script
|
||||||
ansible.builtin.copy:
|
ansible.builtin.copy:
|
||||||
src: reset-mate-clock.sh
|
src: reset-mate-clock.sh
|
||||||
dest: "{{ ansible_env.HOME }}/.local/bin/reset-mate-clock"
|
dest: "{{ ansible_env.HOME }}/.local/bin/reset-mate-clock"
|
||||||
mode: '0755'
|
mode: '0755'
|
||||||
|
when: mate_session.stat.exists
|
||||||
|
|
Loading…
Reference in a new issue