skipping: [ansible-oel6] => (item=ansible) => {
"changed": false,
"item": "ansible",
"skip_reason": "Conditional result was False"
}
---
# tasks file for PS1_customize
- name: Appending customization to /etc/bashrc. Logout/in to see changes
blockinfile:
path: /etc/bashrc
backup: no
marker: "# {mark} ANSIBLE MANAGED BLOCK - ps1_customizations"
block: |
#If id command returns zero, you've root access.
if [ $(id -u) -eq 0 ]; then # set red color prompt for root
PS1="\\[$(tput setaf 1)\\]\\u@\\h:\\w # \\[$(tput sgr0)\\]"
elif [ $(id -u) -eq 4000 ]; then
# Configure special user with green
PS1="\[$(tput bold)\]\[$(tput setaf 2)\]\\u@\\h:\\w \\$ \[$(tput sgr0)\]"
else
PS1="\\u@\\h:\\w \$ "
fi
when: ansible_hostname | lower | search("item")
# when: ansible_hostname | lower | search("prod") or
# ansible_hostname | lower | search("backup") or
# ansible_hostname | lower | search("nfs") or
# ansible_hostname | lower | search("ansible")
with_items:
- prod
- backup
- nfs
- ansible
failed_when: false
--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-project+unsubscribe@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/12ce80a6-bc0e-4edd-b903-1e4fa44e6546%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
when: item in ansible_hostname
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/12ce80a6-bc0e-4edd-b903-1e4fa44e6546%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.