I love Ansible! It is so useful even though my skills with it are very minimal, it is so powerful and useful. I have about 80 or 90 playbooks that I use over and over. They're all pretty simple but they get things done. I forget when and where I can use ad-hoc ansible commands. I love it when those work though. I thought I could use ad-hoc to view /etc/resolv.conf and goofed around with -shell and had no success. Then I found this I had written 13 months ago:
- hosts: all
sudo: yes
tasks:
- name: Display /etc/resolv.conf
shell: cat /etc/resolv.conf
register: resolv
- name: Debug resolv
debug: var=resolv
- name: Debug resolv.stdout as part of a string
debug: msg=`{{ resolv.stdout }}`
Monday, December 10, 2018
Wednesday, November 28, 2018
Codename: Ubuntu Rusty
Just call me Rusty - with regards to Ubuntu anyway. Man! I can't remember how to set the IP in the old Ubuntu. Now, 18.04 has changed yet again. I'm a RHELish* user when I'm not using Slackware for my own personal desktop. Don't get me wrong - Ubuntu is a fine desktop. I used it from '04 to '09 parting ways when the Unity desktop came into play. I did enjoy Xubuntu and then later Lubuntu but found my 5+ years of 'buntu had weakened my RHELish skills much in the way the last (nearly 10) years has mu 'buntu skills SO I switched back. Actually, I always load Ubuntu for other people (non-Unix folks) who want to salvage an old laptop or old desktop that ran Windows 7 or something. I've had some success stories there. But I digress.
This is just a place to save these commands so I don't have to hunt them up YET AGAIN.
$ sudo hostnamectl set-hostname linuxconfig
This note is not (currently) for me: Check for the existence of /etc/cloud/cloud.cfg and change preserve_hostname: false to preserve_hostname: true
That is all I have to say since this note is mainly for me. Hopefully I'll know what else to do when I need this information again.
---
*RHELish (pronounced "relish") is the term I coined for Red Hat -like based systems such as (of course) Red Hat Enterprise Linux, CentOS, Scientific Linux and Oracle Linux.
This is just a place to save these commands so I don't have to hunt them up YET AGAIN.
Changing an Ubuntu 18.04 LTS server's name
This is pretty easy.$ sudo hostnamectl set-hostname linuxconfig
This note is not (currently) for me: Check for the existence of /etc/cloud/cloud.cfg and change preserve_hostname: false to preserve_hostname: true
Changing the static IP of an Ubuntu 18.04 LTS server
This is no longer in the /etc/network/interfaces. Instead look in /etc/netplan (sudo -s first or it will not auto-complete leading me to believe it didn't exist). The file is 50-cloud-init.yaml.That is all I have to say since this note is mainly for me. Hopefully I'll know what else to do when I need this information again.
---
*RHELish (pronounced "relish") is the term I coined for Red Hat -like based systems such as (of course) Red Hat Enterprise Linux, CentOS, Scientific Linux and Oracle Linux.
Subscribe to:
Posts (Atom)