Skip to content

Instantly share code, notes, and snippets.

View goldyfruit's full-sized avatar
🦎

Gaëtan Trellu goldyfruit

🦎
View GitHub Profile
@goldyfruit
goldyfruit / pki.yml
Last active March 2, 2016 21:19
[ansible] Running keystone-manage pki_setup on one host and send SSL certificates on other nodes
---
- name: Ansible tests playbook
hosts: all
remote_user: root
tasks:
- name: Running PKI setup and creating a tarball with certificates
shell:
keystone-manage pki_setup --keystone-user keystone --keystone-group keystone && \
cd /etc/keystone/ && \
@goldyfruit
goldyfruit / pkg.yml
Last active December 16, 2020 09:40
[ansible] Check via the yum module and a registered value if a package is installed or not
---
- name: Ansible tests playbook
hosts: all
remote_user: root
tasks:
- name: Check if mariadb-libs-5.5.44-2.el7.centos.x86_64 package is installed
yum:
list=mariadb-libs-5.5*x86_64
register: pkg
@goldyfruit
goldyfruit / hosts
Last active February 16, 2016 23:16
[ansible] Generate the /etc/hosts with Ansible
#!/usr/bin/env python
import json
data = {
"openstack": {
"children": [
"controller"
],
"vars": {