<IP> ansible_connection=ssh ansible_ssh_pass=<password> ansible_ssh_user=<username>
Saturday, 20 June 2020
Configure QPID
Listener
listener {
host: 0.0.0.0
port: 5001
role: inter-router
Connector
Connector {
host: public IP
port: 5001
role: inter-router
Regex pattern to convert puppet host file to ansible host
puppet cert list --all | egrep "^\+.*" | awk -F"\"" '{ print $2 }' > /etc/ansible/puppet_hosts
Saturday, 6 June 2020
Sunday, 24 May 2020
To use Kerberos authentication you need these optional dependencies
# for Debian/Ubuntu/etc: $ sudo apt-get install gcc python-dev libkrb5-dev $ pip install pywinrm[kerberos] # for RHEL/CentOS/etc: $ sudo yum install gcc python-devel krb5-devel krb5-workstation python-devel $ pip install pywinrm[kerberos]
Saturday, 9 May 2020
Wednesday, 6 May 2020
ANSIBLE FACTS
get all facts from a node (ad hoc)
ansible -i hosts targetName -m setup -a "filter="facter_*"
use fact in a playbook
include fact as {{ ansible_factname }}
add fact to Hosts file
[group]
host1 admin_user=jane
host2 admin_user=jack
host3
[group:vars]
admin_user=john
get default IPV4 address
ansible_default_ipv4.address
Local facts
place .fact file into /etc/ansible/facts.d on target node
vim /etc/ansible/facts.d/fruits.fact
[fruits]
sweet=banana, apple, grapes
bitter=grapefruit
get Local facts
ansible -i hosts mrx -m setup -a "filter=ansible_local"
Subscribe to:
Comments (Atom)
Git
1 git add ↳ It lets you add changes from the working directory into the staging area 2 git commit ↳ It lets you save a snapshot of currently...
-
https://github.com/crossplane-contrib
-
awk '{u=$2+$4; t=$2+$4+$5; if (NR==1){u1=u; t1=t;} else print ($2+$4-u1) * 100 / (t-t1) "%"; }' \ <(grep 'cpu ...
-
https://docs.aws.amazon.com/eks/latest/userguide/create-cluster.html