[ansible-project] Check disk space/cleanup if full

2018-02-01 Thread Gabriel Forster
Across a number of different flavors of Linux as well as AIX, I need to clean up our splunkforwarder space. I've tried numerous different approaches and am running into errors. This should be rather simple, but it is proving not to be. Below is my latest iteration and some of the relevant erro

[ansible-project] Calculate Certain Day of Month As variable

2018-04-03 Thread Gabriel Forster
Is there a way to calculate a certain day of the month and set that as a var? e.g. - I need to make {{ third_tuesday }} represent the 3rd Tuesday of any given month. -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this

[ansible-project] Find module results not returning as expected

2018-04-07 Thread Gabriel Forster
Using the find module to find unknown files in a given directory and register the results as a variable to be looped through later on. The debug of the registered var shows a full on array of all kinds of attributes about the files (way more than I want) - except the file name! It does show the

[ansible-project] Showing which roles have been run on a machine

2017-07-06 Thread Gabriel Forster
Is there a standard way to show which roles have been installed on a target machine from that machine? e.g. Ansible control machine installs Apache & MySQL on Remote1 and Nginx & MySQL on Remote2. If I SSH into Remote2, can it tell me that Ansible successfully installed Nginx & MySQL? Alterna

[ansible-project] Run playbook in --check mode from the target

2017-07-17 Thread Gabriel Forster
Is there any way from the target machine to run it's playbook(s) in --check mode and display output on the target machine? I'm hoping for something smoother than ssh'ing to the control machine, running intended playbook(s), outputting to a file and rsync'ing it back to the target. The goal is to

[ansible-project] Dynamic Groups In Custom Dynamic Inventory

2017-11-03 Thread Gabriel Forster
I have a custom dynamic inventory whose source data is basically a custom flat-file database that consists of a hostname and a bunch of key=value pairs. In the dynamic inventory, I'm using those key=value pairs as hostvars. I currently do not have any defined groups. What I would like to do is

Re: [ansible-project] Dynamic Groups In Custom Dynamic Inventory

2017-11-06 Thread Gabriel Forster
This looks like the right idea...Just need to figure out how to get it working. On Friday, November 3, 2017 at 6:10:09 PM UTC-4, Brian Coca wrote: > > This might be what you want. > > http://docs.ansible.com/ansible/devel/plugins/inventory/constructed.html > > > > -- > -- > Brian Coca

[ansible-project] Email & Jinja2 templates

2017-12-08 Thread Gabriel Forster
Is there a way to easily send email notifications using a template as the email body? If I use a file lookup for the body, will all of the templating aspects work? -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To unsubscribe from this gro

[ansible-project] need to pull value from mysql (or elsewhere) as a variable

2016-07-20 Thread Gabriel Forster
The servers here have nfs-mounted volumes. I need to get that volume name (stored in mysql) and make a symlink to it. Any idea how to accomplish this without manual intervention? Thanks! -- You received this message because you are subscribed to the Google Groups "Ansible Project" group. To u

[ansible-project] Need playbook values from mysql (or other external source)

2016-07-20 Thread Gabriel Forster
I have a set of servers to migrate to new hosts. We want to keep a specific nfs mounted volume from the old host and apply the same volume with the same IP to the new host. These values are stored in mysql as well as, obviously, the old host. Currently, this is being done manually. Is there a

[ansible-project] ansible-playbook fails with error regarding module:setup

2016-07-20 Thread Gabriel Forster
When I run the playbook on the local computer against the target server, I get a very long error telling me the setup module failed. $ ansible-playbook -i "server.fqdn," playbooks/server_build.yml -K --ask- pass --check -v > SSH: EXEC sshpass -d12 ssh -C -vvv -o ControlMaster=auto -o Contr

[ansible-project] Gather variables from database

2016-07-27 Thread Gabriel Forster
In setting up a brand new server that is being migrated from old server with the same (similar) name. e.g. server1 is migrating to migrate-server1. The old server has a volume name mounted to a particular dir. e.g. the volume is mounted in /mydir/myvol3. Another server may have their volume mou

[ansible-project] rsync data 1:1 between old/new servers w/roles

2016-08-05 Thread Gabriel Forster
I have a group of oldservers and matching new servers. I need to rsync a dir from each old one to each corresponding new one. e.g. oldserver1:/some/path --> newserver1:/some/path oldserver2:/some/path --> newserver2:/some/path oldserver3:/some/path --> newserver3:/some/path Even with the sa

[ansible-project] Re: rsync data 1:1 between old/new servers w/roles

2016-08-05 Thread Gabriel Forster
On Friday, August 5, 2016 at 7:55:12 AM UTC-4, Gabriel Forster wrote: > > I have a group of oldservers and matching new servers. I need to rsync a > dir from each old one to each corresponding new one. > > e.g. > > oldserver1:/some/path --> newserver1:/some/path >

[ansible-project] Variables and templates between roles

2017-02-28 Thread Gabriel Forster
I may be way off in the way I'm trying to accomplish this, but I think I need to pass variables from one role to another. I am setting up svn on a Suse server. I'm using the geerlingguy.apache and a rather modified geerlingguy.svn roles. I need the apache role available to deploy apache with v

[ansible-project] Aliases for hosts

2017-03-20 Thread Gabriel Forster
I have certain servers that are called various things by different members of my team. Some say "myserver1" others reference the same server by a DNS alias "orangeserver" and others reference by another alias "specialwebserver." Let's imagine that the above isn't going to change (at least not

[ansible-project] Sudoers File On Control Machine For Ansible User

2017-03-24 Thread Gabriel Forster
Our boxes have one user for Ansible that has appropriate privileged escalations & SSH keys. This works fine, if you su - to that user. Otherwise, if you are yourself, you can only run plays by providing the passphrase for sudo and ssh. I'd like to have the Sudoers file (and appropriate bash al

[ansible-project] Re: Sudoers File On Control Machine For Ansible User

2017-03-24 Thread Gabriel Forster
nsible-vault='sudo -u iansibleuser /usr/bin/ansible-vault' On Friday, March 24, 2017 at 8:08:27 AM UTC-4, Gabriel Forster wrote: > > Our boxes have one user for Ansible that has appropriate privileged > escalations & SSH keys. This works fine, if you su - to that user. >

[ansible-project] Issue understanding variables and with_items

2017-04-04 Thread Gabriel Forster
I think my issue is that I'm trying to get with_items to do too much. But when I use user.uniq instead of with_items, I'm getting a similar error. I'm really not understanding what approach to take. Thanks, Here is the task: - name: Create New Version Directories in User's Home Dir file: pa