Skip to content

Instantly share code, notes, and snippets.

View Pablohn26's full-sized avatar
🏠
Changing the world while working at (your company)

Pablo Hinojosa Pablohn26

🏠
Changing the world while working at (your company)
View GitHub Profile
with the next structure:
- vmHash: { vcpu: 1,
ram: 1024,
storage: 10,
vms: [{name: storage1-dev02,ip: 10.199.3.87},
{name: storage2-dev02,ip: 10.199.3.88},
{name: storage3-dev02,ip: 10.199.3.89}]
}
- name: getting tty
shell: virsh dumpxml {{ item.name }} | grep "tty=" | cut -d= -f3 | cut -d/ -f4 | cut -d\' -f1
#shell: virsh dumpxml log-dev02 | grep "tty=" | cut -d= -f3 | cut -d/ -f4 | cut -d\' -f1
with_items: vmHash.vms
register: ntty
- name: entering on the shell inside each tty
shell: "echo '6' > /dev/pts/{{ item.stdout }}"
with_items: ntty.results
@Pablohn26
Pablohn26 / invalid selinux context
Last active January 3, 2016 08:09
Selinux problem: invalid selinux context
Hi,
I am having problems when I use the template module over a ZFS filesystem with NFS mounted with a selinux context for Apache.
The command is the next:
- name: Base Files - template /cluster/default/apache/created/index.html.j2
template: src=cluster/default/apache/created/index.html.j2 dest=/cluster/default/apache/created/index.html owner=apache group=apache mode=0644
I have also used:
- name: Base Files - template /cluster/default/apache/created/index.html.j2