Setting Up an Ansible Development Desktop
Categories:
Projects:
c2platform/phx/ansible
Overview
This guide outlines the steps to create an Ansible Development Desktop in the PHX domain, providing the necessary environment for Ansible development.
Prerequisites
- Setting Up the PHX Development Environment on Ubuntu 22.04: Set up your Ansible development desktop with Ansible, Vagrant, LXD, and VirtualBox on Ubuntu 22.04. Clone the PHX project directories to extend the base C2 development environment. Use this setup to configure essential base services, including the Microsoft AD domain controller and reverse proxy. Finally, access web-based services in the environment via a Firefox profile using the forward proxy for sandboxed access.
Setup
To create the development node pxd-ubuntu-devtop, execute the following
command:
vagrant up pxd-ubuntu-devtop
78 - name: ubuntu-devtop
79 description: Ansible Development Desktop
80 box: ubuntu22-desktop-lxd
81 ip-address: 192.168.60.11
82 plays:
83 - core/linux
84 sync_folders: []
Verify
Domain Admin Local Admin Rights on Linux
The Domain Admin tony@c2platform.org has administrator rights on
pxd-ubuntu-devtop whichs allow him to become root without a password
(equivalent to the vagrant user):
vagrant ssh pxd-ubuntu-devtop
Become domain admin “Tony”:
sudo su - tony
And Tony can become root
sudo su - sudo
Show me
In order for domain user “Tony” to be local admin on all Ubuntu nodes, Ansible
created a file /etc/sudoers.d/c2. The is configured in the Ansibloe inventory
project
c2platform/phx/ansible
see the file group_vars/ubuntu/ad.yml. It contains:
138 content: |
139 [sssd]
140 debug_level = 9
141 domains = {{ px_ad_domain_name }}
142 services = nss, pam, ssh, sudo
143
144 [domain/{{ px_ad_domain_name }}]
145 debug_level = 9
146 id_provider = ad
Domain Member
The pxd-ubuntu-devtop node will automatically join the Active Directory
(AD) domain managed by Ansible.
To confirm that the node is part of the C2PLATFORM.ORG domain, run the
following commands:
root@pxd-ubuntu-devtop:~# realm discover
realm: No default realm discovered
root@pxd-ubuntu-devtop:~# realm list
c2platform.org
type: kerberos
realm-name: C2PLATFORM.ORG
domain-name: c2platform.org
configured: kerberos-member
server-software: active-directory
client-software: sssd
required-package: sssd-tools
required-package: sssd
required-package: libnss-sss
required-package: libpam-sss
required-package: adcli
required-package: samba-common-bin
login-formats: %U@c2platform.org
login-policy: allow-realm-logins
root@pxd-ubuntu-devtop:~#
Note: Additional Kerberos verification steps may be required to ensure complete integration of the node into the domain.
If you have a domain user (e.g., tony), you can verify that Kerberos is functioning correctly by logging in with the domain user to SSH into localhost.
Run the following command:
ssh tony@pxd-ad.c2platform.org
Additional Information
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.