path=roles/
target=openvpn
reponame=ansible-role-${target}
fullpath=${path}${target}
This file contains hidden or 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
| #!/bin/bash | |
| repo="$(git config --get remote.origin.url|sed -E 's/http(s)?:[/]{2}([^/]+)[/]/git@\2:/')" | |
| test -n "$repo" || repo="$PWD" | |
| if ! security find-generic-password -gw -s "$repo" -a "ansible-vault" -D "ansible vault" | |
| then | |
| echo "Enter password for $repo:" 1>&2 | |
| read pass |
This file contains hidden or 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
| #!/bin/sh -ux | |
| on_die() | |
| { | |
| echo "Dying..." | |
| exit 0 | |
| } | |
| trap 'on_die' TERM INT |
This file contains hidden or 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
| #!/bin/bash | |
| ls ~/.ssh/config.d/ | { | |
| echo -n '' > ~/.ssh/config | |
| while read file | |
| do | |
| cat ~/.ssh/config.d/$file >> ~/.ssh/config | |
| echo '' >> ~/.ssh/config | |
| done | |
| } |
- hosts: all
tasks:
- name: set marker
set_fact:
marker: marker
- name: group by marker
group_by: key=marker---
- hosts: all
sudo: yes
tasks:
- name: Remove user ubuntu
user: name=ubuntu remove=yes state=absentNewerOlder