summaryrefslogtreecommitdiff
path: root/ansible_stuff.org
diff options
context:
space:
mode:
Diffstat (limited to 'ansible_stuff.org')
-rw-r--r--ansible_stuff.org41
1 files changed, 23 insertions, 18 deletions
diff --git a/ansible_stuff.org b/ansible_stuff.org
index 400958f..3b7cf61 100644
--- a/ansible_stuff.org
+++ b/ansible_stuff.org
@@ -2,7 +2,7 @@
#+TITLE: my scrappy ansible notes
#+AUTHOR: blizzack
-* <2023-10-23 Mon>
+* <2023-10-23 Mon> ---------------------------------------------------------
- installing ansible via pip
@@ -303,7 +303,7 @@ bash-5.2$
bash-5.2$
bash-5.2$
-* <2023-10-24 Tue>
+* <2023-10-24 Tue> ---------------------------------------------------------
decided it would be nice to have another host to play around with so
i dusted off 'bbox' and logged into it from 'boom2'
@@ -391,7 +391,7 @@ Connection to 192.168.0.220 closed.
https://www.educba.com/ansible-hosts-file/
-* <2023-10-29 Sun>
+* <2023-10-29 Sun> ---------------------------------------------------------
- created '~/.ansible/hosts' file like so:
@@ -447,7 +447,7 @@ ansible dev -m ping
msg: Hello Ansible World
#+end_src
-* <2023-10-30 Mon>
+* <2023-10-30 Mon> ---------------------------------------------------------
- make sure to setup my path correctly so that the ansible executable
can be found
@@ -491,14 +491,14 @@ bash-5.2$ echo $PATH
- seems i dont understand YAML well enuf
https://docs.ansible.com/ansible/latest/reference_appendices/YAMLSyntax.html
-* <2023-11-02 Thu>
+* <2023-11-02 Thu> ---------------------------------------------------------
some definitions of things:
- control node = my ansible server
- managed node(s) = target systems
-* <2023-11-22 Wed>
+* <2023-11-22 Wed> ---------------------------------------------------------
did a lil research on more resources
@@ -630,7 +630,7 @@ playbook: 12-playbook-copy-directory.yml
ansible-playbook -l dev-stations 12-playbook-copy-directory.yml
-* <2023-11-30 Thu>
+* <2023-11-30 Thu> ---------------------------------------------------------
researching 'roles' and how to use them.
@@ -696,7 +696,7 @@ https://docs.ansible.com/ansible/latest/playbook_guide/playbooks_reuse_roles.htm
- localhost.yml
- other_hosts.yml
-* <2023-12-04 Mon>
+* <2023-12-04 Mon> ---------------------------------------------------------
- experimented w/ using the 'inventory_hostname' above by using an
example from here:
@@ -711,7 +711,7 @@ https://docs.ansible.com/ansible/latest/playbook_guide/playbooks_reuse_roles.htm
https://github.com/cesarvr/ansible-role-hello-world
- the inet needs more simple examples like this !!
-* <2023-12-05 Tue>
+* <2023-12-05 Tue> ---------------------------------------------------------
- How to Use Ansible Roles to Abstract your Infrastructure Environment
https://www.digitalocean.com/community/tutorials/how-to-use-ansible-roles-to-abstract-your-infrastructure-environment
@@ -733,7 +733,7 @@ https://docs.ansible.com/ansible/latest/playbook_guide/playbooks_reuse_roles.htm
https://stackoverflow.com/questions/53253879/ansible-vars-files-vs-include-vars
https://stackoverflow.com/questions/36134552/use-multiple-var-files-in-ansible-role
-* <2023-12-07 Thu>
+* <2023-12-07 Thu> ---------------------------------------------------------
- worked w/ 'var_files' and that did not do what i expected
- playing w/ 'group_vars' directory
@@ -775,7 +775,7 @@ https://docs.ansible.com/ansible/latest/playbook_guide/playbooks_reuse_roles.htm
- so...this explains why trying to add different variablse for the
hosts in roles was painful...its bcuz its in the wrong place
-* <2023-12-08 Fri>
+* <2023-12-08 Fri> ---------------------------------------------------------
- continued my tests of copying files and found the correct way is to
use hosts and/or group vars that can be kept in the playbook or w/
@@ -820,14 +820,14 @@ https://docs.ansible.com/ansible/latest/playbook_guide/playbooks_reuse_roles.htm
'ansible.builtin.command'
https://stackoverflow.com/questions/56663332/difference-between-shell-and-command-in-ansible
-* <2023-12-12 Tue>
+* <2023-12-12 Tue> ---------------------------------------------------------
today i learned that ansible makes it a lil difficult to copy/move
files around on the controller node. they make it very apparent that
ansible is for contolling managed nodes not necessarily controlling
the control node.
-* <2023-12-13 Wed>
+* <2023-12-13 Wed> ---------------------------------------------------------
looking at examples to update a file on a managed host
@@ -840,7 +840,7 @@ https://docs.ansible.com/ansible/latest/collections/ansible/builtin/lineinfile_m
- an online python regex syntax checker
https://pythex.org/
-* <2023-12-14 Thu>
+* <2023-12-14 Thu> ---------------------------------------------------------
copy 'rc.firewall' from bbox to boom2:
@@ -848,7 +848,7 @@ rsync --progress -avzhr --delete -e 'ssh -i ~/.ssh/20231024bbox' dpierre@192.168
https://chmod-calculator.com/
-* <2023-12-15 Fri>
+* <2023-12-15 Fri> ---------------------------------------------------------
lol..learned of a lil abnormality w/ ansible today. while testing
replacing contents of a file w/ the 'ansible.builtin.replace' module
@@ -943,7 +943,7 @@ https://www.pythontutorial.net/python-regex/python-regex-backreferences/
ansible replace examples:
- https://www.linuxtechi.com/replace-strings-lines-with-ansible/
-* <2023-12-16 Sat>
+* <2023-12-16 Sat> ---------------------------------------------------------
just pointing out another case of weirdness that occured as a result
of the 'command' vs. 'shell' in a playbook.
@@ -1018,8 +1018,7 @@ while the same object under the shell command returns a string, like so:
just documenting this fact here cuz i have a feeling this weirdness
will bite me in the ass someday.
-
-* <2023-12-19 Tue>
+* <2023-12-19 Tue> ---------------------------------------------------------
- slackpkg module
@@ -1038,6 +1037,12 @@ will bite me in the ass someday.
there does not seem to be a module for this since it is considered
'unofficial'
+- interesting i see an example of using a template w/in a template here:
+ https://medium.com/@chandrapal/managing-linux-users-ssh-keys-using-ansible-39ee2fc24c16
+
+ - i've seen references online that say this does not work well.
+ will need to test this
+
* references
2023-12-16 -- the following is a lists of ansible related URLs compiled so far.