On 22. sep. 2017 00:59, Joli Martinez wrote:
On Thursday, September 21, 2017 at 3:58:05 PM UTC-4, Bob Tanner wrote:
This is what I do.
https://gist.github.com/basictheprogram/29a093366b2bdc9d15a07312c8d29587
OK, but what is wrong with my playbook?
Your "- name: Add Unix Admins users"
On 22. sep. 2017 01:08, John Harmon wrote:
This works under a regexp tester, but fails under ansible. I don't know
how to correct it.
You need to use a Python based one, since Ansible is using Python re.
Basically, it finds the lines starting with passwd or group, looks in the
lines for
Success
Some Learning Assumptions:
===
So, this section I think I kinda get - it sets up 'r' to iterate through
the 'patterns' matches found beneath 'paths'.
- yum:
name: "{{ r.files | map(attribute='path') | list }}"
This must iterate through
This works under a regexp tester, but fails under ansible. I don't know
how to correct it.
Basically, it finds the lines starting with passwd or group, looks in the
lines for sss, and appends if it isn't found.
- name: Update nsswitch.conf
replace:
path: /etc/nsswitch.conf
regexp:
On Thursday, September 21, 2017 at 3:58:05 PM UTC-4, Bob Tanner wrote:
>
> This is what I do.
>
> https://gist.github.com/basictheprogram/29a093366b2bdc9d15a07312c8d29587
>
>
OK, but what is wrong with my playbook?
thanks
--
You received this message because you are subscribed to the Google
You can have multiple plays in a playbook so your playbook could look
something like this.
- name: setup PS requirements on all hosts
hosts: firsthost
tasks:
- name: install psexec
win_chocolatey:
name: sysinternal
state: present
- name: setup PS with psexec
In your main.yml put in include_tasks: windows.yml when the host is Windows
and include_tasks: unix.yml when it is not. You can use the gathered facts
to do this or you can have a variable that can be set when running on
Windows by the end user.
Personally I think you should still split the
I currently have a role that I am trying to tailor to install a splunk
forwarder on both Linux and Windows machines but I'm a little confused as
to how I should be telling the main.yml to yes go target these other two
tasks splunklinux.yml if it's a RedHat Linux distribution or go to
I see. I'm not thinking abstractly enough. Thanks!
On Thursday, September 21, 2017 at 4:47:49 PM UTC-4, Dave Florek wrote:
>
> Hi,
>
> I'm looking at the Ansible 'authorized_key' module and I'm unable to
> figure out whether it's possible to push locally stored .pub keys to the
>
Hello,
I am wondering if anyone have used the above before. I have a task
that I was initially using command module but today came across above
module and decided to improve that task by using a module. The task
is to prevent desktop users using auto login as its insecure.
After starting to
On 21. sep. 2017 22:47, Dave Florek wrote:
Hi,
I'm looking at the Ansible 'authorized_key' module and I'm unable to figure
out whether it's possible to push locally stored .pub keys to the
authorized_keys file on a remote host. I don't want to go the route of
uploading .pub keys to a webserver
The docs for the authorized_key module has an example that covers this
exact case:
http://docs.ansible.com/ansible/latest/authorized_key_module.html
- name: Set authorized key took from file
authorized_key:
user: charlie
state: present
key: "{{ lookup('file',
Hi,
I'm looking at the Ansible 'authorized_key' module and I'm unable to figure
out whether it's possible to push locally stored .pub keys to the
authorized_keys file on a remote host. I don't want to go the route of
uploading .pub keys to a webserver and use URL links to transfer the keys
to
I didn't go look at the authors page. Based on what you provided, the
first play is missing `tasks:`
On Thu, Sep 21, 2017 at 3:41 PM, Bob Tanner
wrote:
>
>
> On Thursday, September 21, 2017 at 3:11:41 PM UTC-5, Matt Martz wrote:
>>
>> You seem to be missing `tasks:`
On Thursday, September 21, 2017 at 3:11:41 PM UTC-5, Matt Martz wrote:
>
> You seem to be missing `tasks:` in your first play. As such YAML wasn't
> expecting you to start a list there.
>
>
So the original authors Listing 11 is wrong?
--
You received this message because you are
You seem to be missing `tasks:` in your first play. As such YAML wasn't
expecting you to start a list there.
On Thu, Sep 21, 2017 at 3:03 PM, Bob Tanner
wrote:
> I'm following this post, https://www.ibm.com/developerworks/cloud/library/
>
I had seen the doc before, but I didn't notice the definition under the
regexp before. Thank you.
On Thursday, September 21, 2017 at 1:51:31 PM UTC-6, John Harmon wrote:
>
> I need to set the multiline flag on this, but don't know how to. Can
> anyone help?
>
> regexp:
On 21. sep. 2017 22:01, John Harmon wrote:
Just a thought I am using this with the replace module does it
already assume multiline (as lineinfile does not)?
Have you read the docs under regexp?
https://docs.ansible.com/ansible/latest/replace_module.html
--
Kai Stian Olstad
--
You
I'm following this
post,
https://www.ibm.com/developerworks/cloud/library/cl-provision-docker-containers-ansible/index.html,
and Listing 11
---
- name: initialize provisioning
hosts: docker
- name: start up target container
docker:
image: python:2.7
name: lab
Just a thought I am using this with the replace module does it
already assume multiline (as lineinfile does not)?
On Thursday, September 21, 2017 at 1:51:31 PM UTC-6, John Harmon wrote:
>
> I need to set the multiline flag on this, but don't know how to. Can
> anyone help?
>
> regexp:
This is what I do.
https://gist.github.com/basictheprogram/29a093366b2bdc9d15a07312c8d29587
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to
Hello,
I am new to Ansible.
I am creating my first playbook. I would like to add a useraccount to all
my hosts, make the user a sudo user and have them sudo without a password.
Also remove root logins.
for some reason it is not working and seem to figure out why. I keep
getting the error.
I need to set the multiline flag on this, but don't know how to. Can
anyone help?
regexp: '^(?:passwd):\s+(?:(?!sss).)+$'
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it,
On 21. sep. 2017 20:51, daddyocruzer wrote:
Hello
tasks:
- name: yum local install
yum: name=/sharedfilesystem/*.rpm state=present
Our team has several environments that lead up to our production
environment, so patches must be applied and tested in one environment at a
time (as
That's fine, look at with_items to get it all done in a single yum transaction.
On 21 September 2017 at 19:51, daddyocruzer wrote:
> Hello
>
> tasks:
> - name: yum local install
> yum: name=/sharedfilesystem/*.rpm state=present
>
> Our team has several
proposed .. developed .. remains to be seen.
--
--
Brian Coca
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to
Ok nevermind. This works now. I forgot to add become: yes to the main file
in the last try. The task now calls the handler, despite the failure in the
2nd task.
So with the tasks/main.yml
tasks/main.yml
- name: Install nginx
yum:
name: nginx
state: installed
register:
Thanks Kai
On Thu, Sep 21, 2017 at 1:39 PM, Kai Stian Olstad <
ansible-project+l...@olstad.com> wrote:
> On 21. sep. 2017 17:20, Dave Florek wrote:
>
>> Hi Branko,
>>
>> Thanks for the response. I only posted what was on line 20.
>>
>
> It's recommended to show everything, you'll get help a lot
So I switched around the tasks in the task/main.yml to get this, and the
notify still doesnt happen
tasks/main.yml
- name: Install nginx
yum:
name: nginx
state: installed
register: nginx_installed
notify:
- restart nginx
- name: Run a command that fails
shell: /bin/false
Yes great info. Thanks Brian. +1 for developing this feature!
Joe
On Monday, September 18, 2017 at 6:55:26 PM UTC-4, Brian Coca wrote:
>
> Not sure if this would help your case
> https://github.com/ansible/proposals/issues/23
>
>
>
> --
> --
> Brian Coca
>
--
You received this
Hello
tasks:
- name: yum local install
yum: name=/sharedfilesystem/*.rpm state=present
Our team has several environments that lead up to our production
environment, so patches must be applied and tested in one environment at a
time (as they exist at a specific version 'point-in-time')
Perfect. Thanks Matt! I am really horrible at regexp. I totally missed
grouping it. I tested it and it works. Thanks again.
On Thursday, September 21, 2017 at 12:18:20 PM UTC-6, Matt Martz wrote:
>
> You haven't actually created a match group in your regex. I assume you
> want something
You haven't actually created a match group in your regex. I assume you
want something like ^(group.*) or something. The () create the match group.
On Thu, Sep 21, 2017 at 1:13 PM, John Harmon
wrote:
> I am trying to append to some lines within the nsswitch file to
Actually, that brings up a follow-up question. why doesn't it treat
it that way in the first example, when I don't use a loop?
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails
Perfect! Thank you Kai Stian Olstad
On Thursday, September 21, 2017 at 12:13:29 PM UTC-6, Kai Stian Olstad
wrote:
>
> On 21. sep. 2017 20:03, John Harmon wrote:
> > If I do the following it works (putting quotes around the mode). Can
> > anybody explain to my why?
>
> Yes, Ansible
I am trying to append to some lines within the nsswitch file to setup
sssd. I am trying this with the loop below, but I have never used backrefs
before. I am unsure if I am doing it correctly. I get an error about an
invalid group reference. I wonder if my regexp is wrong?
Code
- name:
On 21. sep. 2017 20:03, John Harmon wrote:
If I do the following it works (putting quotes around the mode). Can
anybody explain to my why?
Yes, Ansible interprets number starting with 0 as octal number.
0644 = 6*8^2 + 4*8^1 + 4*8^0 = 420 decimal.
So to avoid this conversion you need to use
If I do the following it works (putting quotes around the mode). Can
anybody explain to my why?
>
> - name: test
> template:
> src: "files/sssd.conf"
> dest: "/etc/sssd/sssd.conf"
> mode: 0600
> group: root
> owner: root
>
> - name: Add/Update required files
> template:
When using the template module within a loop, my mode comes out all
weird/wrong. When using stand-alone it works:
- name: test
template:
src: "files/sssd.conf"
dest: "/etc/sssd/sssd.conf"
mode: 0600
group: root
owner: root
- name: Add/Update required files
template:
Thanks, Initially, I developed my interface to connect it with another
product I use; which was more difficult with ara.
(There is a (still in development) version of ansible-report with
PostgreSQL storage and user management)
On Thursday, 21 September 2017 05:51:25 UTC-4, Mike Fennemore
On 21. sep. 2017 16:11, Anfield wrote:
Testing out the force handlers parameter in a role and it is not working
for me.The first tasks fails, so I though the force handlers would force
the second one to get trigger anyway
As I understand the documentation it will only run the handlers that has
On 21. sep. 2017 17:20, Dave Florek wrote:
Hi Branko,
Thanks for the response. I only posted what was on line 20.
It's recommended to show everything, you'll get help a lot faster that
way because the problem can be anywhere as you can see by my comments
bellow.
Code:
---
- hosts: all
Hello All,
I am using vmware_guest_snapshot: module to take snapshot of VMS , I
observed that snapshot Process is very fast and snapshot size is very less
..
if I login to vmware console & take snapshot it will take 11 min and size
of that snap is around 800 MB . on other side ansible play
Hi all.
I'd like to install or update a package specifying the major.minor
version. I.e, upgrade only if there's a bugfix package available. I've
tried using state=*latest* and *present*, but does not work as I expected.
Using: yum: name=nginx-debuginfo-1.6* state=latest
> Suffix "-1.6*" is
Hello,
I'm trying to use the ec2_win_password module to retrieve the default
Administrator password for an EC2 instance. I had a play working and then
upgraded to Ansible 2.4. I added the cryptography module as the notes
indicate. My play continually fails returning a message that it can't
As I understand it, the win_psexec action connects to a Windows host via
winrm and then uses that to run commands on a second Windows host via
psexec?
My question is how to write a playbook such that the first (proxy) host is
always constant, but the second hosts are the ones defined in the
Hi Branko,
Thanks for the response. I only posted what was on line 20. I'm noticing a
general issue where if I double-bracket variables, even as Ansible
instructs me, I still receive error messages. I'm using Ansible version
2.1.1.0.
Code:
*---*
*- hosts: all*
* become: yes*
* vars_prompt:*
Testing out the force handlers parameter in a role and it is not working
for me.The first tasks fails, so I though the force handlers would force
the second one to get trigger anyway
nginx.yml
---
- hosts: appservers
force_handlers: True
roles:
- { role: nginx, when: "ansible_os_family
I have a lot of includes in my roles and I replaced them with include_tasks
which seems to be working fine. Just for one instance there is a problem.
The original task in that role looks like this:
```
- name: "Install Drupal"
include: install.yml
with_items: '{{ drupal_settings }}'
```
On Tue, 19 Sep 2017 10:13:37 -0700 (PDT)
Dave Florek wrote:
> *Error message I get at execution:*
>
> ERROR! Syntax Error while loading YAML.
>
>
> The error appears to have been in
> '/opt/ansible/setup_scripts/create_user.yml': line 20, column 1, but
> may be
can you please share what exactly error you are getting and where you got
stuck?
Thanks
On Thursday, September 21, 2017 at 12:32:30 PM UTC+5:30, Nuwan Vithanage
wrote:
>
> Hi Soniya ,
>
> Thank you for the information I have followed the same link but still
> struck with it
>
>
>
>
> On Thu,
Hello
>>Below is what I need to achieve
i think you forgot to give your requirements. if you can provide what
exactly you need it will be easy to answer.
you can use blockinfile module if you want to insert/update/remove a block
of lines in a file, for more understanding please follow this
Looks good, have you seen this https://github.com/openstack/ara ?
On Wednesday, September 20, 2017 at 3:14:16 PM UTC+2, ma...@unixdev.ca
wrote:
>
> Hi,
>
> I developed and now share an Ansible report in Python (flask)
>
> The python script create a personal temporary tiny web server where you
>
Hello
it is failing because of the password, to solve this problem please follow
these steps:
Add these lines in ansible.cfg file:
[defaults]
sudo_user = root
ask_pass = True
After saving this file export ask sudo password
export ANSIBLE_ASK_SUDO_PASS=true
On
The below error was on 2.3.2.0
I just upgraded to 2.4.0.0 and got the following -
The error was: Unknown parameter in Targets[0]: "EcsParameters", must be
one of: Id, Arn, Input, InputPath
So is this maybe a bugged/broken feature?
On Thursday, 21 September 2017 10:05:59 UTC+2, Derek Gibson
I want to be able to update ecs scheduled tasks via ansible, using
- cloudwatchevent_rule:
name: ansitest
schedule_expression: "cron(0 20 * * ? *)"
description: test from ansible
targets:
- id: ansitest
arn:
Hi Soniya ,
Thank you for the information I have followed the same link but still
struck with it
On Thu, Sep 21, 2017 at 12:11 PM, Soniya panwar
wrote:
>
> Hello
>
> To integrate Ansible tower version 3.1.5 with LDAP you can follow this
> link:
>
Hello
To integrate Ansible tower version 3.1.5 with LDAP you can follow this link:
http://docs.ansible.com/ansible-tower/latest/html/administration/ldap_auth.html
On Tuesday, September 19, 2017 at 12:03:21 PM UTC+5:30, Nuwan Vithanage
wrote:
>
> *HOW CAN I INTEGRATING ANSIBLE TOWER WITH LDAP
ios_logging module does not support purge as of now, as you figured it out
this is a feature under development.
Also, the way currently aggregate works is subject to change in future as
there are ongoing discussions to
implement this using Ansible loops (something similar to with_*).
Stay
59 matches
Mail list logo