Is there a good way to abort the playbook if host is not ready?
For example I want to run a playbook against *thisserver*, but *thisserver* is
unreachable by ssh or it is reachable but there is no python install. If
any of these occurs I'd like to playbook to abort and stop processing tasks
--
In my ansible tower I can execute a command successfully on a remote
server, however when I try to run a playbook I get:
{
"msg": "Failed to connect to the host via ssh: Warning: Permanently
added 'hostname,10.1.4.66' (ECDSA) to the list of known
hosts.\r\nPermission denied
(publickey,gssa
Thank you!
--
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 ansible-project+unsubscr...@googlegroups.com.
To view this discussion on the web visit
https://gro
Do you guys have a good idea what is the best way to determine a group's id
them reuse that in a variable?
For ex:
% getent group monitor
monitor:x:990:polkitd
I need 990, then I have to add a line to /etc/fstab including 990
Thanks!
--
You received this message because you are subscribed to t
Thank you guys, this fixes the first part.
But how do I reuse the output of getent, I tried, the following but didn't
work
- getent:
database: group
- debug:
var: getent_group.monitor
- name: add line to fstab
lineinfile:
path: /etc/fstab
line: proc/procp
Thank you, this did it:
- name: set fact for group
set_fact:
group_id: "{{ getent_group.monitor[1] }}"
- name: Add proc to fstab and mount it
mount:
path: /proc
src: proc
fstype: proc
opts: "defaults,hidepid=2,gid={{ group_id }}"
dump: 0
I'm looking for a playbook which would scan all servers and if a particular
package (ex: kernel-3.10.0-1062 or nginx-1.12.2-2) is installed would send
an email with the hostname.
Did anyone do something alike?
--
You received this message because you are subscribed to the Google Groups
"Ansibl
20:51 -0700 (PDT)
> Laci > wrote:
>
> > I'm looking for a playbook which would scan all servers and if a
> particular
> > package (ex: kernel-3.10.0-1062 or nginx-1.12.2-2) is installed would
> send
> > an email with the hostname.
> > Did anyone do s
Awesome, thank you very much!
On Thursday, August 13, 2020 at 1:47:07 PM UTC-4, Vladimir Botka wrote:
>
> Laci,
>
> On Thu, 13 Aug 2020 08:47:31 -0700 (PDT)
> Laci > wrote:
>
> > ... it finds the package only if no specific version is
> > specified. For ex
I'm working on a playbook which would remove lines from a file containing
specific hostname.
I want to use Ansible to remove the hostname AND surrounding lines. Here is
an example of a block that I need to remove:
FileSet {
Name = "vcenter-hostname05"
Include {
Options {
signature = SHA1
So far my best option is to run a command which invokes sed
On Tuesday, June 14, 2022 at 2:30:01 PM UTC+2 Laci wrote:
> I'm working on a playbook which would remove lines from a file containing
> specific hostname.
> I want to use Ansible to remove the hostname AND surrounding lin
ible
> Documentation
> <https://docs.ansible.com/ansible/latest/collections/ansible/builtin/lineinfile_module.html>
> or use the *shell module* to work with sed!
>
> On Tuesday, June 14, 2022 at 4:59:38 PM UTC+2 Laci wrote:
>
>>
>> So far my best option is to run a c
I am new in Ansible world. I spent some time solving this but got to the
point when I need to ask:
I have a file called jobs.inc and I need to add six lines with Ansible.
Here is an example
% cat jobs.inc
Job {
Name= "server1"
Client = "server1-fd"
JobDefs = "DefaultJob"
}
Job {
Name
}
backup: yes
On Tuesday, May 12, 2020 at 3:47:30 PM UTC-4, Vladimir Botka wrote:
>
> On Tue, 12 May 2020 12:32:11 -0700 (PDT)
> Laci > wrote:
>
> > % cat jobs.inc
> > Job {
> > Name= "server1"
> > Client = "server
Actually this is my goal.
We are going to have add new servers every time to this file.
So the following lines will be repeated X times
Job {
Name= "serverX"
Client = "serverX-fd"
JobDefs = "DefaultJob"
}
>
> "Using a custom marker without the {mark} variable m
JobDefs = "DefaultJob"
}
Linux:
Job {
Name= "serverX"
Client = "serverX-fd"
JobDefs = "DefaultJob"
FileSet = "linux"
}
On Thursday, May 14, 2020 at 10:31:36 AM UTC-4, Laci wrote:
>
> Actually this is my
I have some files with 0400/-r permissions on server A that I need
to copy to server B and preserve permissions.
For example:
serverA:/etc/ssl_cert.key -> serverB:/etc/ssl_cert.key
How would you do it?
--
You received this message because you are subscribed to the Google Groups
"Ansib
Another detail is that serverA can't talk to serverB or vice versa, only
the Ansible server can talk to both of them
On Tuesday, May 19, 2020 at 2:29:49 PM UTC-4, Laci wrote:
>
> I have some files with 0400/-r permissions on server A that I need
> to copy to server
ch (to get the file on the
> controller), and stat (to get rights) modules
>
> Regards,
>
> JYL
>
>
> Le 19/05/2020 à 22:38, Laci a écrit :
>
> Another detail is that serverA can't talk to serverB or vice versa, only
> the Ansible server can talk to both of
19 matches
Mail list logo