Posts

Chrony - NTP

chronyd Daemon for Clock Synchronization chronyc Command-line client used to monitor and control chronyd /etc/chrony.conf # dnf install chrony -y # systemctl enable --now chronyd # systemctl status chronyd # vi /etc/chrony.conf server time.google.com iburst # iburst Speeds up initial synchronization Check synchronization # chronyc tracking View connected NTP servers # chronyc sources -v # timedatectl set-ntp true # systemctl restart chronyd Force synchronization # chronyc makestep # ntpdate -q time.google.com # queries an NTP server for its time without changing the system clock. # ntpdate -s time.google.com # synchronizes the system clock with an NTP server and logs the output using syslog instead of printing it to the terminal # chronyd -q 'server time.google.com iburst' journalctl -u chronyd

Kubernetes(K8S)

  Kubernetes is an open-source orchestrator for deploying containerised applications Kubernetes was introduced by Google as an open-source project in 2014. The project was announced in June 2014. Its first stable release, version 1.0, followed on July 21, 2015.  At the time of the 1.0 release, Google also announced that Kubernetes would be donated to the newly formed Cloud Native Computing Foundation (CNCF).  When we say "reliable, scalable distributed system," more and more services are delivered over the network via API Container Images Container images bundle a program and its dependencies into a single artifact under a root filesystem Container Image format has been standardised 

Rubrik Backup Service (RBS)

Rubrik Backup Service (RBS) is the core service responsible for performing and managing backup and recovery operations on a Rubrik node. It coordinates communication between the Rubrik cluster and the protected workloads (VMware, Hyper-V, databases, file systems, etc.). For Linux --- - name: (Red Hat) Download the Rubrik Connector get_url: url: "https://{{ rubrik_cluster_ip }}/connector/rubrik-agent.x86_64.rpm" dest: /tmp/rubrik-agent.x86_64.rpm validate_certs: no force: no - name: (Red Hat) Install the Connector yum: name: /tmp/rubrik-agent.x86_64.rpm state: present - name: (Red Hat) Start and Enable the Rubrik Services (RHEL 7+) systemd: name: rubrikagents state: started enabled: yes when: ansible_distribution_major_version|int > 6 For Windows --- - name: (Windows) Create a Temporary Download Location win_file: path: C:\Temp state: directory - name: (Windows) Download the Rubrik Connector win_get_url: url...

Redhat Servers Under AD

packages # dnf install sssd realmd oddjob oddjob-mkhomedir adcli krb5-workstation samba-common-tools samba-common authselect-compact openldap-clients policycoreutils-python # vi /etc/resolv.conf search < ad.local > $ nslookup -type=SRV _ldap._tcp.<ad.local> Firewall Service Port Protocol Notes DNS 53 UDP and TCP LDAP 389 UDP and TCP LDAPS 636 TCP Optional Samba 445 UDP and TCP For AD Group Policy and Objects (GPOs) Kerberos 88 UDP and TCP Kerberos 464 UDP and TCP Used by kadmin for setting and changing a password LDAP Global Catalog 3268 TCP If the id_provider = ad option is being used LDAPS Global Catalog 3269 TCP Optional NTP 123 UDP Optional NTP 323 UDP optional To ensure that the server can correctly communicate with Active Directory # update-crypto-policies --set DEFAULT:AD-...

ansible.cfg

The ansible.cfg file is the main configuration file that controls how Ansible behaves globally or per project. Where Ansible Looks for ansible.cfg (VERY IMPORTANT) Order of precedence: ANSIBLE_CONFIG (environment variable) ./ansible.cfg (current project directory) ✅ ~/.ansible.cfg (user home) /etc/ansible/ansible.cfg (system-wide) 💡 First one found → used

Ansible Vault

  Ansibel Vault Ansible Vault performs various operations. Specifically, it can Encrypt/Decrypt a file View an encrypted file without breaking the encryption Edit an encrypted file Create an encrypted file Generate or reset the encrypted key Ansible Vault uses AES256 encryption The ansible-vault create command is used to create the encrypted file. # ansible-vault create test_vault # it will prompt for a password New Vault password: Confirm New Vault password: # cat test_vault $ ANSIBLE_VAULT; 1.1 ;AES 256 34363365356262323333626363616366383161393739663331373231386563306632323163336231 6537393461353932353035373561636461633738396662640 a 316165346666303439303030623032 62653534643866343465313134373862343839646434353130393764366632393237656265303531 3062613639663865310 a 383137316133653435643236336635626661323736646336323434643164 6162 Ansibel Vault id # ansible-vault create --vault-id password@prompt multi_vault.yml New vault password (password): Confirm new vault password (password):...

Ansible Variables_1

Ansible_Facts Ansible implements fact collecting through the a module called the setup module. It collects detailed information (called facts) from managed nodes. It collects detailed information (called facts) from managed nodes. By default, Ansible automatically runs setup at the start of every play. $ ansible ubuntu -m setup - name : Gather facts manually hosts : all tasks : - name : Run setup module ansible.builtin.setup : - debug : msg : "Host {{ ansible_hostname }} has {{ ansible_memtotal_mb }} MB RAM" Filtering Facts Collect only specific facts - name : Get only network-related facts ansible.builtin.setup : filter : ansible_default_ipv4 - name : Get only facts that start with 'ansible_processor' ansible.builtin.setup : filter : 'ansible_processor*' - name : Get only facts that start with 'ansible_processor' and 'ansible_mem' ansible.builtin.setup : filter : 'ansible_processor*...