Skip to content

Instantly share code, notes, and snippets.

@ytakano
Last active November 25, 2015 10:21
Show Gist options
  • Save ytakano/f53fc2dcc4e468d48124 to your computer and use it in GitHub Desktop.
Save ytakano/f53fc2dcc4e468d48124 to your computer and use it in GitHub Desktop.
ansible for insmod netmap.ko
# command:
# ansible-playbook -i /etc/ansible/hosts --ask-sudo-pass insmod_netmap.yaml
- hosts: netmap
sudo: yes
vars:
work_dir: /root/down
netmap_dir: "{{work_dir}}/netmap"
tasks:
- name: rmmod
shell: "rmmod netmap.ko"
register: result
failed_when: "'XXX' in result.stderr"
- name: insmod
shell: "cd {{netmap_dir}}/LINUX && insmod netmap.ko"
register: result
failed_when: "'No such file or directory' in result.stderr"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment