I am using Ansible AWX for the first time. My goal is to use AWX for pinging a Dev VM. When I used WSL Ubuntu, I was able to configure my Kerberos config file by typing sudo nano /etc/krb5.conf.
Here is how my file looks:
[libdefaults]
default_realm=PACIFIC.NXTTRAVEL.COM
allow_weak_cryot=true
dns_lookup_realm=true
dns_lookup_kdc=true
rdns=false
ticket_lifetime=24h
renew_lifetime=7d
forwardable=true
forward=true
[realms]
NXTTRAVEL.COM={
kdc=us03p01v00v0077.PACIFIC.NXTTRAVEL.COM
admin_server=us03p01v00v0077.PACIFIC.NXTTRAVEL.COM
}
[domain_realm]
.pacific.NXTTRAVEL.com=PACIFIC.NXTTRAVEL.COM
pacific.NXTTRAVEL.com=PACIFIC.NXTTRAVEL.COM
I am unable to identify how would I do this using AWX. I reviewed the documentation and understood I will be setting up credentials of type machine but unsure how the other configuration here is suppose to be done using AWX. Can someone please provide me a hint?
Solution:
Docker runs AWX itself.
But when you launch a job template AWX talks to receptor.
Receptor spins up a container from your EE and then runs the playbook inside the EE container.
So you can create a custom EE based off the default one with anything additional required for Kerberos (like your conf file).
Then add the EE into AWX and apply it to your job template. Now when AWX runs the playbook receptor will start your new EE with
the kerb5.conf file installed
Related
I have Jenkins and Ansible Server installed on different window machines .But how to trigger ansible playbook from jenkins
I added Ansible server as a Slave in Jenkins Server . I need solution on how to trigger anisble playbook
from jenkins
Go to Manage Jenkins > Manage Plugins >Available > search Ansible. If you are already installed Ansible Plugin on your Jenkins It will display in the Installed section. Now we can see the Invoke Ansible Playbook option in the Build Environment section but we need to configure Ansible path for Jenkins
I have created two Ubuntu machines on virtual box. I am able to ping the other machine from the terminal of the other.
However when I ping from ansible I get the following error.
My /etc/ansible/hosts file is :
Can I get the solution for this ?
If you read the documentation you will notice:
This is NOT ICMP ping
So the way in which the ping command works and the way in which Ansible module works is different.
Reading further, Ansible ping module is described as:
Try to connect to host, verify a usable Python and return pong on success.
So Ansible tries to connect (and the default connection method is SSH) and execute Python code.
In your case Ansible failed to connect.
SSH connectivity is a prerequisite, so you need to configure that before you'll be able to use Ansible. For Ubuntu 16.04 you might need to additionally install OpenSSH.
Refer to the official guide for the installation and configuration steps.
On top of that, Ubuntu Server 16.04 does not install Python 2 by default, so you need to manually add it (Ansible support for Python 3 is still experimental).
Refer to answers under this question on AskUbuntu.
Then you still might need to set a parameter in the inventory file to tell Ansible to use Python 2. Or make Python 2 the default interpreter.
Background : Chef Server Version 12 and a Windows workstation SDK 0.10 targeting windows nodes
I've created recipes and bootstrapped local windows servers into the Chef manager and applied recipes so the very basics are all working.
Question : when running the bootstrap commands for a hosted server (e.g azure / aws) I need the command to come from the Chef Server not the workstation.
I had hoped that the knife.rb with the Chef_server_url would force all commands to come from there.
WireShark shows the WinRM connections trying to come from my workstation.
Is there any setting I can implement that forces this in the knife.rb or elsewhere?
I had tried to add the following from searches but they've not been successful :
chef_zero.enabled false
local_mode false
Is this resolved through Chef Provisioning rather than Chef knife commands?
many thanks in advance for any assistance you can give.
"when running the bootstrap commands for a hosted server (e.g azure / aws) I need the command to come from the Chef Server not the workstation." is not correct. Knife commands that manipulate servers go directly from your workstation, and this is how it is supposed to work. The way the bootstrap functions is it starts the cloud machine using the relevant provider API, then connects to the new VM via SSH or WinRM and installs Chef, and then launches chef-client using a configuration file based on your knife settings (this is where chef_server_url comes in).
Ansible unlike chef and puppet uses agent less run .
I would like to know is there any ansible remote client so that we can connect to fleet of ansible control machines to execute ansible playbooks on their respective targets .
I am looking for a command line cliient similar to following
ansible-execute hostname_of_control_machine username_of_control_machine password_of_control_machine inventory_file playbook_name
Please suggest if any ?
There is nothing preventing you from using Ansible to run Ansible on other machines. The Python API might be a good place to start, as you can get programmatic control over the initial Ansible runner.
You can do this with SSH
ssh username#controlmachine 'ansible-playbook yourPlaybook.yml
I installed the Rundeck server in one Linux machine.
Tomcat is running in a Windows 7 machine.
Now, I want to stop and start the Tomcat service in the Windows machine by creating a job in Rundeck (on the Linux machine).
Is it possible?
Yes, this is possible.
Install Cygwin, including openssh-server to the Windows machine. Generate a public key for the Rundeck server user and add it to the .authorized_hosts file on the Windows machine. Ensure you have port 22 or an alternate port accessible for SSH.
In rundeck, create a new job which fires the Tomcat executable or any commands you prefer for starting/stopping the service.
It may help to prefix the Rundeck job command with some $PATH variables if the connecting user account has trouble locating executables in the Windows/Cygwin environment.