Skip to content

Instantly share code, notes, and snippets.

View pol's full-sized avatar

pol llovet pol

View GitHub Profile
@pol
pol / yum_debugging1.txt
Last active August 29, 2015 14:12
repolist all
[root@hyalite ~]# yum repolist all
Loaded plugins: fastestmirror, priorities, refresh-packagekit
Loading mirror speeds from cached hostfile
* base: mirror.supremebytes.com
* epel: mirror.pnl.gov
* extras: centos.mia.host-engine.com
* updates: mirrors.xmission.com
351 packages excluded due to repository priority protections
repo id repo name status
C6.0-base CentOS-6.0 - Base disabled
@pol
pol / Readme.md
Created September 23, 2014 17:57
Exercise.io Elixir Exercirse

Bob

Bob is a lackadaisical teenager. In conversation, his responses are very limited.

Bob answers 'Sure.' if you ask him a question.

He answers 'Whoa, chill out!' if you yell at him.

He says 'Fine. Be that way!' if you address him without actually saying anything.

Keybase proof

I hereby claim:

  • I am pol on github.
  • I am pol (https://keybase.io/pol) on keybase.
  • I have a public key whose fingerprint is BA86 97D9 B6BC B583 8DF9 C319 CFE1 BF1A 30F1 E495

To claim this, I am signing this object:

@pol
pol / ansible-role
Created July 2, 2014 22:45
ansible-role shell script
#!/bin/sh
if [ $# -lt 1 ]; then
echo "Usage: ansible-role ROLE ARGS...\n(see ansible-playbook --help for args)"
exit 1
fi
ROLE=$1
shift
OPTS=$*
@pol
pol / common-account
Last active August 29, 2015 13:58
MSU RCG SMB/LDAP conf files
#
# /etc/pam.d/common-account - authorization settings common to all services
#
# This file is included from other service-specific PAM config files,
# and should contain a list of the authorization modules that define
# the central access policy for use on the system. The default is to
# only deny service to users whose accounts are expired in /etc/shadow.
#
# As of pam 1.0.1-6, this file is managed by pam-auth-update by default.
# To take advantage of this, it is recommended that you configure any
- name: add lines in sources.list file
lineinfile: dest=/etc/apt/sources.list.d/zabbix.list line={{item}} create=yes
with_items:
- deb http://repo.zabbix.com/zabbix/2.2/debian squeeze main
- deb-src http://repo.zabbix.com/zabbix/2.2/debian squeeze main
register: zabbix_sources_list
- name: grab the zabbix gpg key for the sources
shell: gpg -q -y --keyserver subkeys.pgp.net --recv-keys D13D58E479EA5ED4;
gpg -a --export D13D58E479EA5ED4 | sudo apt-key add -
@pol
pol / ansible-playbook-output.txt
Last active January 4, 2016 10:39
What is going on here?!
PLAY [gluster-nfs-server] *****************************************************
GATHERING FACTS ***************************************************************
ok: [srv1.domain.edu]
ok: [srv2.domain.edu]
ok: [srv3.domain.edu]
ok: [srv4.domain.edu]
TASK: [debug] *****************************************************************
ok: [srv1.domain.edu] => {
@pol
pol / terminal copy
Created October 17, 2013 20:29
After running through a playbook successfully, I have hit a snag, and now I can't get anything other than raw to work. Any ideas?
☺ ~/Projects/Ansible/msu_ansible ∴ ansible vhost -i development -m raw -a "hostname" -vvv -c paramiko
<biome> ESTABLISH CONNECTION FOR USER: pol on PORT 22 TO biome.rcg.montana.edu
<biome> EXEC hostname
biome | success | rc=0 >>
biome
☹ ~/Projects/Ansible/msu_ansible ∴ ansible vhost -i development -a "hostname" -vvv
<biome> ESTABLISH CONNECTION FOR USER: pol
<biome> EXEC ['ssh', '-tt', '-q', '-o', 'ControlMaster=auto', '-o', 'ControlPersist=60s', '-o', 'ControlPath=/tmp/ansible-ssh-%h-%p-%r', '-o', 'Port=22', '-o', 'KbdInteractiveAuthentication=no', '-o', 'PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey', '-o', 'PasswordAuthentication=no', '-o', 'ConnectTimeout=3', 'biome', "/bin/sh -c 'mkdir -p $HOME/.ansible/tmp/ansible-1382041514.81-116805009926217 && chmod a+rx $HOME/.ansible/tmp/ansible-1382041514.81-116805009926217 && echo $HOME/.ansible/tmp/ansible-1382041514.81-116805009926217'"]
<biome> REMOTE_MODULE command hostname
@pol
pol / ansible run
Created August 15, 2013 18:10
setup module hangs on a vz machine (this isn't the first time i have gotten this). NOTE: It worked once! Then it didn't. :(
☹ ~/Projects/Ansible/msu_ansible ∴ ansible-playbook site.yml -i production -k --limit "<HOST>" -c paramiko -vvv
SSH password:
PLAY [virt2:virt3] ************************************************************
GATHERING FACTS ***************************************************************
<HOST> ESTABLISH CONNECTION FOR USER: pol on PORT 22 TO <HOST>
<HOST> EXEC /bin/sh -c 'mkdir -p $HOME/.ansible/tmp/ansible-1376589410.62-37098251026012 && chmod a+rx $HOME/.ansible/tmp/ansible-1376589410.62-37098251026012 && echo $HOME/.ansible/tmp/ansible-1376589410.62-37098251026012'
<HOST> REMOTE_MODULE setup
<HOST> PUT /var/folders/lg/_rds9m6n12l5gkn5xgl6kpsm0000gn/T/tmposXcgY TO /home/pol/.ansible/tmp/ansible-1376589410.62-37098251026012/setup
@pol
pol / Bisect Results
Last active December 20, 2015 20:19
ansible error from playbook, used git bisect to find when the problem showed up
git bisect good start: 863b88ba44ac9bb41401d634a2374c7b4d01ff89
git bisect bad start:1c361a99680305097c9b098aeb2413fdfe697064
1a4e6e415ef9fa156aecbd7682d309858542c69b is the first bad commit
commit 1a4e6e415ef9fa156aecbd7682d309858542c69b
Author: Serge van Ginderachter <serge@vanginderachter.be>
Date: Thu Aug 8 16:21:03 2013 +0200
Check for ansible_facts in results for with_ tasks