Skip to content

Instantly share code, notes, and snippets.

View constrict0r's full-sized avatar
👘
The plan is programmed in all of my thousand robots

Victor Mattei constrict0r

👘
The plan is programmed in all of my thousand robots
  • @cslucr @lamportcomputing
  • Costa Rica
View GitHub Profile
@constrict0r
constrict0r / playbook run ansible
Created November 19, 2018 15:37
playbook run ansible
ansible-playbook -v playbook.yml --extra-vars "variable-1=false"
@constrict0r
constrict0r / ansible run tests
Last active November 25, 2018 19:41
ansible run tests.
ansible-playbook customization.yml -t test --ask-become-pass
@constrict0r
constrict0r / bats run tests
Created November 20, 2018 21:20
bats run tests.
./test/libs/bats/bin/bats test/
@constrict0r
constrict0r / basic_playbook.yml
Last active January 21, 2019 07:19
Ansible include role
---
- name: Debian base configuration.
hosts: localhost
connection: local
gather_facts: yes
roles:
- role: debian-base
@constrict0r
constrict0r / xorriso.sh
Last active February 7, 2019 14:18
Remaster iso for preseeding
xorriso -as mkisofs -o ~/remaster.iso \
-isohybrid-mbr /usr/lib/ISOLINUX/isohdpfx.bin \
-c isolinux/boot.cat \
-b isolinux/isolinux.bin -no-emul-boot \
-boot-load-size 4 -boot-info-table /path_to_iso_files
@constrict0r
constrict0r / docker-rm-all.sh
Created January 27, 2019 04:32
Stop/Remove all docker containers.
docker stop $(docker ps -a -q)
docker rm $(docker ps -a -q)
@constrict0r
constrict0r / docker-run-command.sh
Created January 28, 2019 21:14
Docker run command on container.
docker run -t constrict0r/debian-kickstart ls
@constrict0r
constrict0r / docker-build-push.sh
Last active September 5, 2019 14:54
Docker build/push to dockerhub.
docker build -t constrict0r/catalyst:latest .
docker login
docker push constrict0r/catalyst:latest
@constrict0r
constrict0r / playbook-iso.sh
Last active April 24, 2019 06:05
Ansible playbook to preseed a Debian iso.
ansible-playbook -i tests/inventory tests/test.yml --ask-become-pass \
--extra-vars 'iso_path=file:///home/username/debian-9.7.0-amd64-netinst.iso \
firmware_path=/home/username/firmware \
partype=whole \
rootpass="1234" \
userpass="1234" \
networkname="MY NETWORK" \
networkpass="my-network-pass"'
@constrict0r
constrict0r / variable-exists.yml
Last active February 10, 2019 14:16
Verify ansible variable is defined, is setted and is not empty.
- name: Hello when you exists.
debug:
msg: Hello, you exist.
when: not (
(you is undefined)
or
(you is none)
or
(you | trim == '')
)