Created
December 6, 2014 21:31
-
-
Save valorin/94194e626afa0baa93be to your computer and use it in GitHub Desktop.
Ansible tasks to configure Mosh and UFW to play nice
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- name: Install Mosh PPA | |
apt_repository: repo='ppa:keithw/mosh' | |
- name: Install Mosh | |
apt: > | |
state=latest | |
pkg=mosh | |
update_cache=yes | |
- name: Copy Mosh Allow UFW script | |
copy: > | |
src=mosh-allow-ufw | |
dest=/usr/local/bin/mosh-allow-ufw | |
owner=root | |
group=root | |
mode=0755 | |
- name: Mosh allow into bashrc | |
lineinfile: > | |
dest=/home/{{ item }}/.bashrc | |
line="sudo /usr/local/bin/mosh-allow-ufw" | |
regexp='mosh-allow-ufw' | |
state=present | |
with_items: | |
- valorin | |
- name: Mosh allow into sudoers | |
lineinfile: > | |
dest=/etc/sudoers | |
line="{{ item }} ALL=(ALL:ALL) NOPASSWD: /usr/local/bin/mosh-allow-ufw" | |
regexp='mosh-allow-ufw' | |
state=present | |
with_items: | |
- valorin |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment