HistoryPurge: Clearing 219 old commits

This commit is contained in:
xpk
2024-10-24 23:09:21 +08:00
commit d08b7cac59
348 changed files with 376141 additions and 0 deletions
+12
View File
@@ -0,0 +1,12 @@
# Usage
Run the following and it will create ansible home under ~/rs-ansible-home and pre-populate with config and dynamic inventory script.
```
curl -sk https://xpk.headdesk.me/git/xpk/code-dumps/raw/branch/master/rs/ansible-create-home.sh | bash
```
Once ansible home is created, you can run ansible through hammertime
```
COREACCOUNT=123456 ansible -m ping linux
```
+35
View File
@@ -0,0 +1,35 @@
#!/bin/bash
mkdir -p ~/rs-ansible-home/keys
cd ~/rs-ansible-home
cat <<EOF > ansible.cfg
[defaults]
inventory=dyn-inventory.sh
gathering = smart
fact_caching = jsonfile
fact_caching_connection = facts-cache.json
fact_caching_timeout = 3600
host_key_checking = False
become = true
log_path = ansible.log
stdout_callback = full_skip
forks=10
retry_files_enabled = False
command_warnings = False
pipelining = True
interpreter_python = auto_silent
vault_password_file = keys/.vault-pass
EOF
cat <<EOF > dyn-inventory.sh
#!/bin/bash
/opt/usefulscripts/ht/bin/ht-6.6.0 --core-account \$COREACCOUNT --quiet ansible
EOF
chmod 755 dyn-inventory.sh
openssl rand -base64 32 > ~/rs-ansible-home/keys/.vault-pass
cat <<EOF > example-usage.md
# Run ansible through hammertime
COREACCOUNT=123456 ansible -m ping linux
EOF