Skip to content

Instantly share code, notes, and snippets.

The update went fine, when you look it downloads my role

Project Update :

Identity added: /tmp/awx_92_7hm0ne75/artifacts/92/ssh_key_data (/tmp/awx_92_7hm0ne75/artifacts/92/ssh_key_data)
Using /etc/ansible/ansible.cfg as config file

PLAY [all] *********************************************************************
```
"/tmp/awx_90_9q2g___v/project/plays/../",
[...]
"├── roles",
"│   └── requirements.yml",
"├── scripts",
"│ └── gen_pass.py",
```
```
TASK [detect requirements.yml] *************************************************
ok: [localhost, -> localhost] => {"changed": false, "stat": {"atime": 1578579230.2607422, "attr_flags": "", "attributes": [], "block_size": 4096, "blocks": 8, "charset": "unknown", "checksum": "8b2df1f86f8ddb442cb35cf8a2cd924e6151989d", "ctime": 1578579229.344763, "dev": 164, "device_type": 0, "executable": false, "exists": true, "gid": 0, "gr_name": "root", "inode": 184451, "isblk": false, "ischr": false, "isdir": false, "isfifo": false, "isgid": false, "islnk": false, "isreg": true, "issock": false, "isuid": false, "mimetype": "unknown", "mode": "0644", "mtime": 1578579229.344763, "nlink": 1, "path": "/var/lib/awx/projects/_8__command_center/roles/requirements.yml", "pw_name": "root", "readable": true, "rgrp": true, "roth": true, "rusr": true, "size": 181, "uid": 0, "version": null, "wgrp": false, "woth": false, "writeable": true, "wusr": true, "xgrp": false, "xoth": false, "xusr": false}}
TASK [fetch galaxy roles from requ
@Nani-o
Nani-o / report.md
Last active February 4, 2019 15:41
User agent not setting up correctly in some ansible modules when using proxy

Using curl with a proxy

command

curl -A "ansible-httpget" -L https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.4/wkhtmltox-0.12.4_linux-generic-amd64.tar.xz

tcpdump captured headers
CONNECT github.com:443 HTTP/1.1
Host: github.com:443
@Nani-o
Nani-o / yaml_multiline.md
Last active June 20, 2018 21:28
Reference for multi line yaml variables

From stackoverflow

In this table, _ means space character. \n means "newline character" (\n in JavaScript), except for the "in-line newlines" row, where it means literally a backslash and an n).

                      >     |            "     '     >-     >+     |-     |+
-------------------------|------|-----|-----|-----|------|------|------|------  
Trailing spaces   | Kept | Kept |     |     |     | Kept | Kept | Kept | Kept
Single newline => | _    | \n   | _   | _   | _   | _    |  _   | \n   | \n
Double newline => | \n   | \n\n | \n  | \n  | \n  | \n   |  \n  | \n\n | \n\n
@Nani-o
Nani-o / github_sync.py
Last active October 30, 2019 02:12
Quick and dirty python script i'm using for backuping my Github repositories
#!/usr/bin/env python3
import os
import sys
import yaml
from github import Github, Gist
from github.GithubException import GithubException
from datetime import datetime
from termcolor import colored
from subprocess import Popen, PIPE, STDOUT
@Nani-o
Nani-o / test.sh
Last active July 15, 2018 23:47
Bash script to test a role inside lxd containers
#!/bin/bash
#
# Testing ansible role.
#
# Exit on fail.
set -e
_UID=$(id -u)
GID=$(id -g)
@Nani-o
Nani-o / pdf_folders_to_csv.sh
Last active November 23, 2017 11:24
Extract PDF info from a folder and all its subfolders into a csv file
#!/bin/bash
# Petit script qui utilise pdfinfo pour extraire de manière récursive des infos sur des PDFs dans un csv.
# Il est nécessaire que pdfinfo soit disponible (e.g : brew install xpdf sous OS X).
# [usage]: ./pdf_folders_to_csv.sh /path/to/folder/of/pdfs [csv_file_name]
[[ -z "$2" ]] && CSV_FILE="pdf_folders_to_csv.csv" || CSV_FILE="$2"
while read -r line
do
@Nani-o
Nani-o / show_ansible_vars.sh
Last active September 6, 2017 10:23
bash - List all Ansible variables within a file or folder
#!/bin/bash
TARGET="$1"
if [[ ! -e "${TARGET}" ]]; then
echo "${TARGET}: no such file or directory"
exit 1
fi
grep --color=always -RoP "{{[A-z0-9 _-]*}}" "${TARGET}" | cut -d ':' -f2 | sort | uniq