This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 1. Install Ansible | |
| # sudo apt update | |
| # sudo apt install software-properties-common | |
| # sudo add-apt-repository --yes --update ppa:ansible/ansible | |
| # sudo apt install ansible -y | |
| # 2. | |
| # sudo ansible-playbook docker_install.yml | |
| --- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| - hosts: debian | |
| become: yes | |
| become_method: sudo | |
| tasks: | |
| - name: updates a server | |
| apt: update_cache=yes | |
| - name: upgrade a server | |
| apt: upgrade=dist dpkg_options='force-confold,force-confdef' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| - name: Configure Proxmox Backup Server (PBS) | |
| hosts: localhost | |
| connection: local | |
| vars: | |
| proxmox_pbs_api_url: "https://yourpbs.tld:8007/api2/json" | |
| proxmox_pbs_username: "root@pam" | |
| proxmox_pbs_password: "rootpassword" | |
| proxmox_pbs_verify_ssl: true | |
| zfs_pool_name: "your_zfs_and_datastore_name" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| - name: Prepare nodes | |
| hosts: k3s02 | |
| become: true | |
| tasks: | |
| - name: Set hostname | |
| hostname: | |
| name: "{{ inventory_hostname }}" | |
| - name: Set timezone | |
| timezone: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| - name: setup gitea container | |
| tasks: | |
| - name: create gitea directory | |
| ansible.builtin.file: | |
| path: ./gitea | |
| - name: create directory for data and config | |
| ansible.builtin.file: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| - name: Get redfish info | |
| hosts: localhost | |
| gather_facts: no | |
| vars: | |
| baseuri: "10.10.10.10" | |
| username: "<user>" | |
| password: "<password>" | |
| host_ips: | |
| - "10.10.10.11" | |
| - "10.10.10.12" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| - name: Install and Configure Haproxy | |
| hosts: redis_mysql | |
| become: yes | |
| tasks: | |
| - name: Enable Software Poperties Support | |
| apt: | |
| name: software-properties-common | |
| install_recommends: yes | |
| state: present |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| - name: Capture list of custom vars keys from file | |
| ansible.builtin.set_fact: | |
| _my_vars: | |
| "{{ lookup('ansible.builtin.file', 'vars/custom_vars.yml') | | |
| from_yaml | dict2items | selectattr('key', 'defined') | | |
| map(attribute='key') }}" | |
| - name: Debug vars | |
| ansible.builtin.debug: | |
| msg: "{{ _my_vars }}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| - name: Install Git from source on ubuntu | |
| hosts: localhost | |
| become: true | |
| vars: | |
| git_version: "2.43.0" | |
| git_download_url: "https://www.kernel.org/pub/software/scm/git/git-{{ git_version }}.tar.gz" | |
| git_install_path: "/usr/local" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| - name: Add repos | |
| deb822_repository: | |
| name: "{{ item.name }}" | |
| types: "{{ item.repo.split()[0] }}" | |
| uris: "{{ item.repo.split()[1] }}" | |
| suites: "{{ item.repo.split()[2] }}" | |
| components: "{{ item.repo.split()[3] }}" | |
| architectures: "{{ item.architecture | default(omit) }}" | |
| signed_by: "{{ item.key }}" | |
| loop: |
NewerOlder