![]() txt_table: A quick text table summary of the available hosts with some minimal information.html_fancy_split: A dynamic, modern HTML page with each host’s details in a separate file.html_fancy: A dynamic, modern HTML page containing all hosts.Available templatesĪnsible-cmdb currently provides the following templates out of the box: If host_vars and group_vars directories exist at that location, they will be included automatically. To use a custom inventory file, specify its path with -i $ ansible-cmdb -i. You can now open overview.html in your browser to view the results. To explicitly specify the use of a fancy template for output generation, use ansible-cmdb -template html_fancy cmdb-output/ > ansible-cmdb-overview.html Next, call ansible-cmdb on the resulting cmdb-output/ directory to generate the CMDB overview page: ansible-cmdb cmdb-output/ > ansible-cmdb-overview.htmlīy default, the html_fancy template is used, which generates output containing an overview of all your hosts, with a section of detailed information for each host. Or specific host group ansible -m setup -user=root -tree cmdb-output/ db-servers -ask-pass You can as well specify a user to run as and password ansible -m setup -user=root -tree cmdb-output/ all -ask-pass Start by generating Ansible output for your hosts: mkdir cmdb-output f, -fact-cache contains fact-cache files h, -help show this help message and exit version show program's version number and exit To view help usage for ansible-cmdb command, pass -help option # ansible-cmdb -help Umask 0022 & ln -s /usr/local/lib/ansible-cmdb/ansible-cmdb /usr/local/bin/ansible-cmdb How to use Ansible-cmdb Umask 0022 & gzip -9 -c contrib/ansible-cmdb.man.1 > /usr/local/man/man1/ansible-cmdb.man.1.gz Umask 0022 & cp README.md /usr/local/lib/ansible-cmdb Umask 0022 & cp LICENSE /usr/local/lib/ansible-cmdb Umask 0022 & cp -r lib/* /usr/local/lib/ansible-cmdb Umask 0022 & cp -a src/* /usr/local/lib/ansible-cmdb Umask 0022 & mkdir -p /usr/local/man/man1 Sample output umask 0022 & mkdir -p /usr/local/lib/ansible-cmdb You can also upgrade Ansible-cmdb through Pip: # Python 3įor macOS users, you can use brew brew install ansible-cmdb Method 2: Install Ansible-cmdb from sourceĬhange to ansible-cmdb directory and run make install cd ansible-cmdb Once pip is installed, download and install ansible-cmdb # Python 3 Use pacman package manager sudo pacman -S python-pip Use the command sudo apt install python3-pip Install pip on Arch Linux / Manjaro Sudo yum install python3-pip Install pip on FedoraĪdd epel repository and install pip sudo dnf install python3-pip Install pip on Ubuntu Run the commands below on your terminal of choice to install pip sudo yum -y install epel-release You need to have pip installed on your server before you can install Ansible-cmdb using this method. You can either install from Ansible-cmdb from source release package or using Python pip package manager Method 1: Install Ansible-cmdb using pip Adding and extending facts of existing hosts and manually adding entirely new hosts.Gathered host facts and manual custom facts.Host overview and detailed host information.and of course, any custom template you’re willing to make.Plain Text table ( -template txt_table), for the console gurus.SQL ( -template sql), for importing host facts into a (My)SQL database.Markdown Split (‘–template markdown_split’), with each host’s details in a separate file (for a large number of hosts).Markdown ( -template markdown), useful for copy-pasting into Wiki’s and such.JSON ( -template json), a dump of all facts in JSON format.CSV ( -template csv), the trustworthy and flexible comma-separated format.Fancy HTML Split ( -template html_fancy_split), with each host’s details in a separate file (for a large number of hosts).Fancy HTML using the option ( -template html_fancy). ![]() ![]() Support for multiple output formats/templates:. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |