<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Bak3y</title>
    <description>The latest articles on Forem by Bak3y (@bak3y).</description>
    <link>https://forem.com/bak3y</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F236457%2F9bc97f89-1078-4871-b566-89616d30043e.jpeg</url>
      <title>Forem: Bak3y</title>
      <link>https://forem.com/bak3y</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/bak3y"/>
    <language>en</language>
    <item>
      <title>When your day could have gone better</title>
      <dc:creator>Bak3y</dc:creator>
      <pubDate>Thu, 13 Feb 2020 23:25:27 +0000</pubDate>
      <link>https://forem.com/bak3y/when-your-day-could-have-gone-better-59h9</link>
      <guid>https://forem.com/bak3y/when-your-day-could-have-gone-better-59h9</guid>
      <description>&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fllpr75iljljrqp2hz4lw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fllpr75iljljrqp2hz4lw.png" alt="I don't know anymore" width="744" height="170"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>git</category>
      <category>funny</category>
      <category>drone</category>
      <category>humor</category>
    </item>
    <item>
      <title>It's the Little Things</title>
      <dc:creator>Bak3y</dc:creator>
      <pubDate>Fri, 04 Oct 2019 19:20:24 +0000</pubDate>
      <link>https://forem.com/bak3y/it-s-the-little-things-15d3</link>
      <guid>https://forem.com/bak3y/it-s-the-little-things-15d3</guid>
      <description>&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F53oa98oa8xlq10hcmeoj.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F53oa98oa8xlq10hcmeoj.JPG" alt="Welcome Box"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Got a cool welcome gift from Shipt, where I start work on Monday.  Excited to get to work over there!&lt;/p&gt;

</description>
      <category>career</category>
      <category>culture</category>
    </item>
    <item>
      <title>Automating New OSX Setup #1.5 - A curveball</title>
      <dc:creator>Bak3y</dc:creator>
      <pubDate>Wed, 02 Oct 2019 15:21:35 +0000</pubDate>
      <link>https://forem.com/bak3y/automating-new-osx-setup-1-5-a-curveball-1kok</link>
      <guid>https://forem.com/bak3y/automating-new-osx-setup-1-5-a-curveball-1kok</guid>
      <description>&lt;p&gt;Up until now, I've been using BASH as my default shell in OSX, and just learned today that with the next version of MacOS, Apple is &lt;a href="https://www.google.com/url?q=https://support.apple.com/en-us/HT208050&amp;amp;sa"&gt;changing the default shell to zsh.&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is going to mean porting my stuff from &lt;a href="https://github.com/Bash-it/bash-it"&gt;BashIt&lt;/a&gt; over to &lt;a href="https://github.com/robbyrussell/oh-my-zsh"&gt;Oh-My-Zsh&lt;/a&gt; and also porting over everything in my dotfiles.&lt;/p&gt;

&lt;p&gt;Anybody have any advice on moving to zsh?&lt;/p&gt;

&lt;p&gt;EDIT - &lt;/p&gt;

&lt;p&gt;I'm now second-guessing switching to zsh?  Why?  Basically every system I'd ever connect to is going to have bash as it's default shell.  Maybe I'd be better off grabbing the latest bash release and installing it myself.&lt;/p&gt;

</description>
      <category>osx</category>
      <category>bash</category>
      <category>zsh</category>
      <category>discuss</category>
    </item>
    <item>
      <title>Automating New OSX Setup #1 - What?</title>
      <dc:creator>Bak3y</dc:creator>
      <pubDate>Tue, 01 Oct 2019 19:18:25 +0000</pubDate>
      <link>https://forem.com/bak3y/automating-new-osx-setup-1-what-137f</link>
      <guid>https://forem.com/bak3y/automating-new-osx-setup-1-what-137f</guid>
      <description>&lt;p&gt;As part of moving to a new job, I'm going to end up with a new Macbook Pro.  As such I'm going to have a super clean slate to start with and I'd like to tackle a goal of mine I've had for a while - a fully automated system configuration.&lt;/p&gt;

&lt;p&gt;Logically step 1 here seems to be the What question: What am I going to try to cover here?  I've come up with a short list that makes sense to me:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Restore keypair from TimeMachine backup&lt;/li&gt;
&lt;li&gt;Install Python3 and pip&lt;/li&gt;
&lt;li&gt;pip install Ansible&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Now that I have a basis for automation, I'd like to do the rest via ansible playbook if possible:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;install Homebrew&lt;/li&gt;
&lt;li&gt;Setup various OS preferences (iCloud login, trackpad, dock, display, etc)&lt;/li&gt;
&lt;li&gt;install Firefox&lt;/li&gt;
&lt;li&gt;sign into Firefox&lt;/li&gt;
&lt;li&gt;install VSCode&lt;/li&gt;
&lt;li&gt;setup dotfiles (should just be a git pull)&lt;/li&gt;
&lt;li&gt;install/configure &lt;a href="https://github.com/Bash-it/bash-it"&gt;BashIt&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;install/configure Go&lt;/li&gt;
&lt;li&gt;setup extensions for VSCode (python, Go, Ansible)&lt;/li&gt;
&lt;li&gt;setup AWS CLI (boto3, botocore)&lt;/li&gt;
&lt;li&gt;configure AWS CLI&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Now's where you guys come in.  What am I forgetting here?&lt;/p&gt;

</description>
      <category>osx</category>
      <category>automation</category>
    </item>
    <item>
      <title>Deterministic Ansible</title>
      <dc:creator>Bak3y</dc:creator>
      <pubDate>Tue, 24 Sep 2019 16:17:31 +0000</pubDate>
      <link>https://forem.com/bak3y/deterministic-ansible-3ch7</link>
      <guid>https://forem.com/bak3y/deterministic-ansible-3ch7</guid>
      <description>&lt;p&gt;Recently I had to deploy AppDynamics agents out to some systems that ran both tomcat and JBOSS workloads, and here's how I used one playbook to rule them all.&lt;/p&gt;




&lt;h2&gt;
  
  
  1 - Figure out which platform I was dealing with
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#check to see if we're tomcat or jboss
- name: Check to see if tomcat user exists
  stat:
    path: /home/tomcat8
  register: tomcat8

- name: check to see if jbossadm user exists
  stat:
    path: /home/jbossadm
  register: jbossadm
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;As you can see, I'm doing a simple stat module check on the home directory of the user running the java workload here.  In our use case those 2 users would never coexist on a server.&lt;/p&gt;

&lt;h2&gt;
  
  
  2 - Swap ownership on files/folders based on our findings above
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#creates directory path
- name: Create the directories for site specific configurations owned by tomcat8
  file:
    path: /usr/local/appdynamics/appagent/
    state: directory
    owner: tomcat8
    group: tomcat8
    mode: 0755
  when: tomcat8.stat.exists

- name: Create the directories for site specific configurations owned by jbossadm
  file:
    path: /usr/local/appdynamics/appagent/
    state: directory
    owner: jbossadm
    group: jbossadm
    mode: 0755
  when: jbossadm.stat.exists
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;So, in each case we're creating the same folder path and changing linux file system ownership based on which platform we're running this ansible playbook on.&lt;/p&gt;

&lt;p&gt;The &lt;a href="https://docs.ansible.com/ansible/latest/modules/stat_module.html"&gt;stat&lt;/a&gt; module and &lt;a href="https://docs.ansible.com/ansible/latest/user_guide/playbooks_conditionals.html?highlight=conditionals#the-when-statement"&gt;when&lt;/a&gt; conditions are pretty powerful tools you can use to make Ansible super flexible without having to pass a bunch of extra parameters in to control which tasks get executed in your playbooks.&lt;/p&gt;

</description>
      <category>ansible</category>
      <category>devops</category>
      <category>automation</category>
    </item>
  </channel>
</rss>
