@scottalanmiller said in Miscellaneous Tech News:
I can haz satellite servicing north Georgia? kplzthx!
Music educator who has completed his transition into IT. I want to know all t3h thingz. Alas, one lifetime isn't long enough to learn everything, so I'll settle for what can be shoved into my brain during this life time.
@scottalanmiller said in Miscellaneous Tech News:
I can haz satellite servicing north Georgia? kplzthx!
@black3dynamite said in Ansible facts nested variable syntax preference:
Looks like Bracket notation is best choice instead of dot.
Bracket notation always works. Dot notation can cause problems because some keys collide with attributes and methods of python dictionaries. Use bracket notation if you use keys which start and end with two underscores (which are reserved for special meanings in python) or are any of the known public attributes:
Overlooked that in the documentation. While it's less efficient to type ['
and ']
rather than .
, I'll live with it.
Consider the below example playbook.
For those that use Ansible regularly, do you have a syntax preference when referencing nested variables within Ansible facts? From what I've gathered there doesn't seem to be a technical difference between these formats:
ansible_cmdline.BOOT_IMAGE
ansible_cmdline['BOOT_IMAGE']
ansible_facts.cmdline.BOOT_IMAGE
ansible_facts['cmdline']['BOOT_IMAGE']
The example in the documentation shows using ansible_facts
and mentions using either dots or brackets, but it appears just starting with ansible_cmdline
in this example appears to work fine.
---
- name: Testing Ansible facts variable syntax
hosts: ansible-client-5
become: yes
tasks:
- name: Display BOOT_IMAGE using variable name with dots.
debug:
msg: "The ansible_cmdline.BOOT_IMAGE is {{ ansible_cmdline.BOOT_IMAGE }}."
- name: Display BOOT_IMAGE using variable name with brackets.
debug:
msg: "The ansible_cmdline['BOOT_IMAGE'] is {{ ansible_cmdline['BOOT_IMAGE'] }}."
- name: Display BOOT_IMAGE using ansible facts variable with dots.
debug:
msg: "The ansible_facts.cmdline.BOOT_IMAGE is {{ ansible_facts.cmdline.BOOT_IMAGE }}."
- name: Display BOOT_IMAGE using ansible facts variable with brackets.
debug:
msg: "The ansible_facts['cmdline']['BOOT_IMAGE'] is {{ ansible_facts['cmdline']['BOOT_IMAGE'] }}."
...
@scottalanmiller said in What Are You Doing Right Now:
@DustinB3403 said in What Are You Doing Right Now:
@siringo said in What Are You Doing Right Now:
@Dashrender said in What Are You Doing Right Now:
@siringo said in What Are You Doing Right Now:
can anyone suggest an android tv box I can plug into the TV? nothing expensive, just something that works. just for streaming services.
why android TV?
because I don't know what i'm doing?
we got an apple tv but it's not very useful, it makes searching through things too hard.
enlighten me.
Roku works well and start at $35
yeah, Roku is super solid.
I replaced an old Apple TV with Roku so I could watch Daily Wire content. Roku has been solid.
Heard about this. I made the move to Bitwarden about a year ago.
Practicing using handlers and when statements in Ansible.
I didn't mind Fry's, but over time I found Microcenter usually had the specific items I wanted / needed in stock.
https://adamtheautomator.com/pending-reboot-registry/ PendingFileRenameOperations was the most common thing I remember.
@scottalanmiller said in Cannot install Windows updates Help Please!:
@EddieJennings said in Cannot install Windows updates Help Please!:
Stuck in a pending reboot state? I can't remember the registry key off the top of my head, but that might be the issue.
No, it's rebooted many times and doesn't request reboots until after an update attempts to apply.
That's why I mentioned the registry key. I ran into this once when installing SCVMM console. You could reboot 10 times, but installer still saw computer was in a pending reboot state. We had PowerShell script to look for it at my last job, but alas, I couldn't take it with me.
Stuck in a pending reboot state? I can't remember the registry key off the top of my head, but that might be the issue.