https://awx.wiki/installation/configuration
Month: September 2019
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