https://awx.wiki/installation/configuration
Uncategorized
windows setup for winrm, for Ansible
In order for Ansible to connect to your windows server, you need to open winrm,you can do it by putting the settings inn a ps1 (/var/www/html/w.ps1) file in your webserver with these contents:
Enable-PSRemoting
Set-Item -Path “WSMan:\localhost\Service\Auth\Basic” -value True
Set-Item -Path “WSMan:\localhost\Service\AllowUnencrypted” -value True
net localgroup “Remote Management Users” my_admin /add
net localgroup administrators my_admin /add
Then in the windows server, you can get it and run it using:
powershell “IEX(New-Object Net.WebClient).downloadString(‘http://10.4.192.192/w.ps1’)”
create Ansible role
To create a role use the ansible-galaxy command
$ ansible-galaxy init SSSD
then add something to main.yml
$ vi SSSD/tasks/main.yml
—
# tasks file for SSSD
#
– name: ensure sssd packages are installed
yum:
name: libselinux-python,realmd,sssd,oddjob,oddjob-mkhomedir,adcli,samba-common,samba-common-tools,ntpdate,ntp,sudo,krb5-workstation,openldap-clients,policycoreutils-python
state: present
– name: make sure line ‘dns=none’ is set in /etc/NetworkManager/NetworkManager.conf
ini_file:
path: /etc/NetworkManager/NetworkManager.conf
state: present
no_extra_spaces: yes
section: main
option: dns
value: none
owner: root
group: root
mode: 0644
backup: yes
notify:
– reload NetworkManager
– name: deploy resolv.conf template
template:
src: templates/resolv.conf.j2
dest: /etc/resolv.conf
owner: root
group: root
mode: 0644
backup: yes
notify:
– reload NetworkManager
– name: Check if machine is bound
shell: /bin/bash -c “realm list | grep sssd”
register: realmd_bound
changed_when: false
ignore_errors: true
– name: Add use_fully_qualified_names = False to /etc/sssd/sssd.conf
lineinfile:
dest: /etc/sssd/sssd.conf
line: ‘use_fully_qualified_names = False’
insertafter: ‘^\[domain/clarios.com\]’
notify:
– restart sssd
when: realmd_bound is failed
– name: Add fallback_homedir = /home/%u to /etc/sssd/sssd.conf
lineinfile:
dest: /etc/sssd/sssd.conf
line: ‘fallback_homedir = /home/%u’
insertafter: ‘^\[domain/clarios.com\]’
notify:
– restart sssd
when: realmd_bound is failed
HP-UX swinstall and depothelper
To install a downloaded .depot file you must provide both the full path to the file and ‘*’
swinstall -s /home/rdircio/depots/depothelper-2.20-ia64_64-11.31.depot ‘*’
then to install a package using depothelper
/usr/local/bin/depothelper wget
reset admin password in macosx tiger
Power on or restart your Mac.
Hold down Command+S on your keyboard to enter single-user mode after the startup sound.
# mount -uw /
# rm /var/db/.AppleSetupDone
# shutdown -h now
Restart the mac and you will be prompted to create a new admin user
find differences within files
awk ‘NR==FNR{a[$0]=1;next}!a[$0]’ file_b file_a
unlock user in hpux
modprpw -k -l rdircio
modprpw -v -l rdircio
Adblocking for DDWRT
Save Startup Script
Code:
_rogue=0.0.0.0
echo -e “n=1\nwhile ! wget -q -O /tmp/hsts http://winhelp2002.mvps.org/hosts.txt ; do\n\t[ \$n -gt 5 ] && break\n\tlet n+=1\n\tsleep 60\ndone\ngrep \”^0.0.0.0\” /tmp/hsts | grep \”^0.0.0.0\” | grep -v localhost | awk ‘{print \”$_rogue\\\t\”\$2}’ | tr -d ‘\\\015’ >/tmp/dlhosts\nrm /tmp/hsts\nkillall -HUP dnsmasq” >/tmp/wh
sh /tmp/wh &
Put Additional DNS Masquerade option:
addn-hosts=/tmp/dlhosts
cronjob
0 12 * * * root /tmp/.rc_startup
Install php and xdebug in macos x
For php56
$ brew install php56 –with-httpd
$ brew install php56-xdebug
If you wish to install php71 , you do not need to remove it, just install it, brew will remove php56
$ brew install php71 –with-httpd –with-pear
To enable PHP in Apache add the following to httpd.conf and restart Apache:
LoadModule php7_module /usr/local/opt/php/lib/httpd/modules/libphp7.so
SetHandler application/x-httpd-php
Finally, check DirectoryIndex includes index.php
DirectoryIndex index.php index.html
The php.ini and php-fpm.ini file can be found in:
/usr/local/etc/php/7.1/
For php 7.1 install xdebug using pecl
/usr/local/Cellar/php@7.1/7.1.16/bin/pecl search xdebug
/usr/local/Cellar/php@7.1/7.1.16/bin/pecl install xdebug
xdebug config files are in:
/usr/local/etc/php/5.6/conf.d/ext-xdebug.ini
/usr/local/etc/php/7.1/conf.d/ext-xdebug.ini
you don’t need to reinstall to switch in apache, just edit and restart
vi /usr/local/etc/httpd/httpd.conf
and enable the line of the version you need:
#LoadModule php5_module /usr/local/Cellar/php56/5.6.32_8/libexec/apache2/libphp5.so
LoadModule php5_module /usr/local/Cellar/php56/5.6.36/lib/httpd/modules/libphp5.so
/usr/local/bin/apachectl -k restart
openldap reset root password
ldap admin is configured in /etc/openldap/slapd.conf
suffix “dc=rdircio,dc=com”
rootdn “cn=orcladmin,dc=rdircio,dc=com”
rootpw password
http://www.linuxhomenetworking.com/wiki/index.php/Quick_HOWTO_:_Ch31_:_Centralized_Logins_Using_LDAP_and_RADIUS#Create_an_LDAP_.22root.22_password