| 1234567891011121314151617181920212223242526272829 |
- ---
- - hosts: kc41
- vars:
- release: focal
- winetricks_patch: /usr/bin
- prefix_dir: /usr/prefixes
- prefix_path: /usr/prefixes/msapps
- user_permission: student
- officepath: /home/vidikon/ANSIBLE/Office2013.tar.gz
- become: true
- gather_facts: no
- tasks:
- - name: Copy wallpaper
- ansible.builtin.copy:
- src: /home/vidikon/ANSIBLE/software-playbooks/files/wallpaper.jpg
- dest: /home/
- owner: "{{ user_permission }}"
- group: "{{ user_permission }}"
- #1000 для pc9, 1001 для остальных
- - name: Set wallpaper
- vars:
- DISPLAY: ":0"
- ansible.builtin.shell: "sudo -H -u student DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/$(id {{ user_permission }} | awk -F '=' '{print $2}' | awk -F '(' '{print $1}')/bus DISPLAY=:0 gsettings set org.cinnamon.desktop.background picture-uri 'file:///home/wallpaper.jpg'"
- - name: Ensure a job that runs at 2 and 5 exists. Creates an entry like "0 5,2 * * ls -alh > /dev/null"
- ansible.builtin.cron:
- name: "check wallpaper"
- minute: "*/5"
- job: "sudo -H -u student DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/$(id {{ user_permission }} | awk -F '=' '{print $2}' | awk -F '(' '{print $1}')/bus DISPLAY=:0 gsettings set org.cinnamon.desktop.background picture-uri 'file:///home/wallpaper.jpg'"
|