{"id":27086599,"url":"https://github.com/al3xdiaz/ansible","last_synced_at":"2026-04-26T23:31:29.214Z","repository":{"id":111664884,"uuid":"597846221","full_name":"Al3xDiaz/Ansible","owner":"Al3xDiaz","description":"This is a collection of scripts and tools to help with the development of the config infrastructure","archived":false,"fork":false,"pushed_at":"2025-09-13T17:07:12.000Z","size":158,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"localhost","last_synced_at":"2025-09-13T19:11:48.049Z","etag":null,"topics":["ansible","config-server","docker"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Al3xDiaz.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-02-05T20:04:10.000Z","updated_at":"2025-09-13T17:07:16.000Z","dependencies_parsed_at":"2025-03-24T06:37:27.548Z","dependency_job_id":null,"html_url":"https://github.com/Al3xDiaz/Ansible","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/Al3xDiaz/Ansible","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Al3xDiaz%2FAnsible","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Al3xDiaz%2FAnsible/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Al3xDiaz%2FAnsible/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Al3xDiaz%2FAnsible/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Al3xDiaz","download_url":"https://codeload.github.com/Al3xDiaz/Ansible/tar.gz/refs/heads/localhost","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Al3xDiaz%2FAnsible/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32317163,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-26T23:26:28.701Z","status":"ssl_error","status_checked_at":"2026-04-26T23:26:25.802Z","response_time":129,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ansible","config-server","docker"],"created_at":"2025-04-06T05:36:22.161Z","updated_at":"2026-04-26T23:31:29.207Z","avatar_url":"https://github.com/Al3xDiaz.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ANSIBLE\n## Create env file\n\n#### Note: you must replace the variables with the values ​​of your servers\n\n```bash\n# create basic inventory\ncat ansible/inventory || echo -e \"[all]\n$(hostname -I | awk '{print $1}') ansible_user=$USER server_ssh_key_passphrasse=\\\"\\\" server_gpg_passphrasse=\\\"\\\"\n[localhost]\n$(hostname -I | awk '{print $1}') ansible_user=$USER server_ssh_key_passphrasse=\\\"\\\" server_gpg_passphrasse=\\\"\\\"\n[all:vars]\nansible_ssh_pass=\\\"\\\"\nansible_sudo_pass=\\\"\\\"\ngit_name=johndoo\ngit_email=john@doo.es\n[personal:children]\nlocalhost\" \u003e ./ansible/inventory\n```\n\n```bash\n# ansible desencrypt inventory\nexport ANSIBLE_VAULT_PASSWORD_FILE=.vault_pass.txt\nansible-vault decrypt inventory\n```\n\n```bash\n# ansible desencrypt inventory\nexport ANSIBLE_VAULT_PASSWORD_FILE=.vault_pass.txt\nansible-vault encrypt inventory\n```\n\n## Build image\n\n```bash\ndocker-compose build\n```\n\n## Test Playbooks\n\n```bash\ndocker-compose up\n```\n\n## Commands available\n\n```bash\n# install ansible on Debian\nsudo apt-get install ansible\n```\n\n```bash\n### Ping all host\n# Note: if ping is UNREACHABLE! or Failed to connect to...\n# copy content by ./ansible/ssh-keys/ansible.pub in file ~/.ssh/authorized_keys in your server.\ndocker-compose run  --rm ansible ansible all -m ping\n```\n\n```bash\n# Copy identity file\n# Note: you can replace \"node-`hostname -I | awk '{print $1}'`\" for your $HOST_NAME or $IP_ADDRESS\ndocker-compose run --rm ansible ssh-copy-id -i /root/.ssh/ansible node-`hostname -I | awk '{print $1}'`\n```\n\n```bash\n#list all hosts\ndocker-compose run --rm ansible ansible all --list-hosts\n```\n\n```bash\n#add ssh key to host\ndocker-compose run --rm ansible ansible-playbook playbooks/01_copy_ssh_key.yml\n```\n\n## Run playbooks\n\n```bash\n#test\n# docker-compose run --rm ansible \\\nansible-playbook Main.yml --tags desktop --check\n```\n\n```bash\n#test\ndocker-compose run --rm ansible ansible-playbook playbooks/devtools.yml --check\n```\n\n```bash\n#test\ndocker-compose run --rm ansible ansible-playbook playbooks/docker.yml --check\n```\n\n```bash\n#test\ndocker-compose run --rm ansible ansible-playbook playbooks/htopPlaybook.yml --check\n```\n\n```bash\n#test\ndocker-compose run --rm ansible ansible-playbook playbooks/interface.yml --check\n```\n\n```bash\n#test\ndocker-compose run --rm ansible ansible-playbook playbooks/interpreters.yml --check\n```\n\n```bash\n#test\ndocker-compose run --rm ansible ansible-playbook playbooks/k8-master-node.yml --check\n```\n\n```bash\n#test\ndocker-compose run --rm ansible ansible-playbook playbooks/k8-nodes.yml --check\n```\n\n```bash\n#test\ndocker-compose run --rm ansible ansible-playbook playbooks/k8-workers-node.yml --check\n```\n\n```bash\n#test\ndocker-compose run --rm ansible ansible-playbook playbooks/nginx.yml --check\n```\n\n```bash\n#test\ndocker-compose run --rm ansible ansible-playbook playbooks/testInclude.yml --check\n```\n\n## link config files to host\n\n```bash\nrm ~/.tmux.*\nrm ~/.bash_aliases\nln -s `pwd`/roles/basic/files/.tmux.conf ~/.tmux.conf\nln -s `pwd`/roles/basic/files/.bash_aliases ~/.bash_aliases\ntmux new source-file ~/.tmux.conf\n```\n\n### Generate GPG key\n\n```bash\nEMAIL=$(git config --global user.email)\n\necho \"writte your email [$EMAIL]]\"\nread YOUR_EMAIL\n[[ \"$YOUR_EMAIL\" == \"\" ]] \u0026\u0026 YOUR_EMAIL=$EMAIL\n\necho \"writte your password for gpg key:\"\nread PASSPHRASE\n\n#Generate key\ngpg --batch --gen-key \u003c\u003cEOF\nKey-Type: 1\nKey-Length: 4086\nSubkey-Type: 1\nSubkey-Length: 2048\nName-Real: $(git config --global user.name)\nName-Email: $YOUR_EMAIL\nPassphrase: $PASSPHRASE\nExpire-Date: 1y\nEOF\n\ngpg --list-secret-keys --keyid-format LONG $YOUR_EMAIL\n\n#Export key\nKEY_ID=$YOUR_EMAIL\ngpg --armor --export $KEY_ID\n\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fal3xdiaz%2Fansible","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fal3xdiaz%2Fansible","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fal3xdiaz%2Fansible/lists"}