Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- root@joe-vm1:~ # cat ixworkstation.yaml
- - hosts: all
- user: "root"
- vars:
- ansible_ssh_port: 22
- ansible_python_interpreter: "/usr/local/bin/python3.6"
- ansible_port: 22
- tasks:
- - name: Enable Linux support in /etc/rc.conf
- shell: |
- sysrc linux_enable="YES"
- - name: Restart abi service to load Linux kernel module
- service: name=abi state=restarted
- - name: Install packages for workstation role on FreeBSD
- pkgng:
- name: xorg, kde5, sddm, firefox, thunderbird, libreoffice, nvidia-driver
- state: present
- - name: Enable NVidia support in /etc/rc.conf
- shell: |
- sysrc kld_list="nvidia-modeset"
- - name: Restart kld service to load NVidia kernel module
- service: name=kld state=restarted
- - name: Configure /usr/local/etc/X11/xorg.conf.d/driver-nvidia.conf
- lineinfile:
- line: "{{ item }}"
- path: /usr/local/etc/X11/xorg.conf.d/driver-nvidia.conf
- create: yes
- with_items:
- - 'Section "Device"'
- - ' Identifier "Card0"'
- - ' Driver "nvidia"'
- - 'EndSection'
- - name: Enable and start all services for workstation role on FreeBSD
- service:
- name: "{{ item }}"
- enabled: true
- state: started
- with_items:
- - dbus
- - sddm
- root@joe-vm1:~ # ansible-playbook-3.6 ixworkstation.yaml --ask-pass -v
- No config file found; using defaults
- SSH password:
- /usr/local/etc/ansible/hosts did not meet host_list requirements, check plugin documentation if this is unexpected
- /usr/local/etc/ansible/hosts did not meet script requirements, check plugin documentation if this is unexpected
- PLAY [all] *************************************************************************************************************************************************************************************************************************************************************************************************************************
- TASK [Gathering Facts] *************************************************************************************************************************************************************************************************************************************************************************************************************
- ok: [127.0.0.1]
- TASK [Enable Linux support in /etc/rc.conf] ****************************************************************************************************************************************************************************************************************************************************************************************
- changed: [127.0.0.1] => {"changed": true, "cmd": "sysrc linux_enable=\"YES\"", "delta": "0:00:00.066474", "end": "2019-02-25 11:39:24.896097", "rc": 0, "start": "2019-02-25 11:39:24.829623", "stderr": "", "stderr_lines": [], "stdout": "linux_enable: YES -> YES", "stdout_lines": ["linux_enable: YES -> YES"]}
- TASK [Restart abi service to load Linux kernel module] *****************************************************************************************************************************************************************************************************************************************************************************
- changed: [127.0.0.1] => {"changed": true, "name": "abi", "state": "started"}
- TASK [Install packages for workstation role on FreeBSD] ****************************************************************************************************************************************************************************************************************************************************************************
- ok: [127.0.0.1] => {"changed": false, "msg": "package(s) already present"}
- TASK [Enable NVidia support in /etc/rc.conf] ***************************************************************************************************************************************************************************************************************************************************************************************
- changed: [127.0.0.1] => {"changed": true, "cmd": "sysrc kld_list=\"nvidia-modeset\"", "delta": "0:00:00.067208", "end": "2019-02-25 11:39:27.779570", "rc": 0, "start": "2019-02-25 11:39:27.712362", "stderr": "", "stderr_lines": [], "stdout": "kld_list: nvidia-modeset -> nvidia-modeset", "stdout_lines": ["kld_list: nvidia-modeset -> nvidia-modeset"]}
- TASK [Restart kld service to load NVidia kernel module] ****************************************************************************************************************************************************************************************************************************************************************************
- changed: [127.0.0.1] => {"changed": true, "name": "kld", "state": "started"}
- TASK [Configure /usr/local/etc/X11/xorg.conf.d/driver-nvidia.conf] *****************************************************************************************************************************************************************************************************************************************************************
- ok: [127.0.0.1] => (item=Section "Device") => {"backup": "", "changed": false, "item": "Section \"Device\"", "msg": ""}
- ok: [127.0.0.1] => (item= Identifier "Card0") => {"backup": "", "changed": false, "item": "\tIdentifier \"Card0\"", "msg": ""}
- ok: [127.0.0.1] => (item= Driver "nvidia") => {"backup": "", "changed": false, "item": "\tDriver \"nvidia\"", "msg": ""}
- ok: [127.0.0.1] => (item=EndSection) => {"backup": "", "changed": false, "item": "EndSection", "msg": ""}
- TASK [Enable and start all services for workstation role on FreeBSD] ***************************************************************************************************************************************************************************************************************************************************************
- ok: [127.0.0.1] => (item=dbus) => {"changed": false, "enabled": true, "item": "dbus", "name": "dbus", "state": "started"}
- ok: [127.0.0.1] => (item=sddm) => {"changed": false, "enabled": true, "item": "sddm", "name": "sddm", "state": "started"}
- PLAY RECAP *************************************************************************************************************************************************************************************************************************************************************************************************************************
- 127.0.0.1 : ok=8 changed=4 unreachable=0 failed=0
- root@joe-vm1:~ #
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement