Hi,
1/
Sounds like you use a lot the when clause to limit the impact of action
to some servers.
Why you did'nt use more the hosts clause to handle the action on
specific hosts ?
You can have more than one hosts clause in a playbook
Notice that you can reuse variable in a previous play in
my inventroy file is below:
[master]
172.24.64.44
172.24.64.42
172.24.64.43
[worker]
172.24.64.46
[cluster:children]
master
worker
I want to exec the playbook in [cluster:children]'s master
172.24.64.44,want to get the variables value ,then use it in other group
,how to write the "when" ? pleas
On Wed, 20 Jan 2021 19:18:40 -0700
Rich Megginson wrote:
> >shell> cat hosts
> >hosta vpn=enabled
> >hostb vpn=disabled
> >hostc vpn=enabled
> >
> > The playbook
> >
> >- hosts: all
> > gather_facts: false
> > tasks:
> >- add_host:
> >groups: vp
On 1/20/21 6:16 PM, Vladimir Botka wrote:
On Wed, 20 Jan 2021 15:45:00 -0700
Rich Megginson wrote:
- hosts: some_arbitrary_name_of_my_group_of_vpn_hosts
roles:
- linux-system-roles.vpn
or you can specify the hosts manually:
- hosts: hosta,hostb,hostc
roles:
- linux-system-rol
On 1/20/21 6:40 PM, Vladimir Botka wrote:
On Wed, 20 Jan 2021 15:45:00 -0700
Rich Megginson wrote:
The use case is that e.g. some sort of per-host key could be defined as
a host fact, and if the role is running on host b, and it needs to set
up a tunnel with host a, it can look up the key in t
On Wed, 20 Jan 2021 15:45:00 -0700
Rich Megginson wrote:
> The use case is that e.g. some sort of per-host key could be defined as
> a host fact, and if the role is running on host b, and it needs to set
> up a tunnel with host a, it can look up the key in the host facts for
> host a.
>
> Of
On Wed, 20 Jan 2021 15:45:00 -0700
Rich Megginson wrote:
> - hosts: some_arbitrary_name_of_my_group_of_vpn_hosts
> roles:
> - linux-system-roles.vpn
>
> or you can specify the hosts manually:
>
> - hosts: hosta,hostb,hostc
> roles:
> - linux-system-roles.vpn
>
> or some combination
On 1/20/21 3:26 PM, Matt Martz wrote:
Typically speaking, I tell people that roles should never know about
your environment. Instead anything that your role needs to know about
should be passed in.
As such, I would avoid needing a special group to exist in your
inventory, but instead maybe pa
Typically speaking, I tell people that roles should never know about your
environment. Instead anything that your role needs to know about should be
passed in.
As such, I would avoid needing a special group to exist in your inventory,
but instead maybe passing that in.
If they need to know host f
I am unfamiliar with how administrators structure their inventories and
playbooks with respect to roles that run against multiple hosts as a
group. We have two new system roles - vpn
https://github.com/linux-system-roles/vpn and ha_cluster
https://github.com/linux-system-roles/ha_cluster - tha
On Wed, 20 Jan 2021 at 13:47, Keith Mills wrote:
> Hi Smooge,
>
> I guess I want to say Governance around Development and Deployment of
> Ansible playbooks. Does this make more sense?
>
>
It is still fuzzy. Pretty much every site I know follows some governance
system which is 'site local' which p
Hi Smooge,
I guess I want to say Governance around Development and Deployment of
Ansible playbooks. Does this make more sense?
On Wednesday, January 20, 2021 at 8:55:46 AM UTC-6 Smooge wrote:
> On Wed, 20 Jan 2021 at 09:47, Keith Mills wrote:
>
>> Hello All,
>>
>> Would someone please explain
Thanks for the help ,our main aim is to create a automated ansible script
which takes multiple path (hard coded) and with find module it should check
files older
than 7 days and should exclude few directories or files and should compress
the other files.
But somehow find and exclude path with ti
On 1/20/21 4:31 PM, Nithin Subbaraj wrote:
> Hi Team,
>
> I am trying to create an ansible script which excludes a particular directory
> and its contents
> and should zip the files under other directories but getting the below error
>
> TASK [archive the files] fatal: : FAILED! => {"msg": "'dic
Hi Team,
I am trying to create an ansible script which excludes a particular
directory and its contents
and should zip the files under other directories but getting the below error
TASK [archive the files] fatal: : FAILED! => {"msg": "'dict object' has no
attribute 'files'"}
my script
##
On Wed, 20 Jan 2021 at 09:47, Keith Mills wrote:
> Hello All,
>
> Would someone please explain Ansible process/governance around playbooks.
>
>
I think you would need to explain in a bit of detail what you mean by
process/governance because that has a similar but different definitions in
configur
Hello All,
Would someone please explain Ansible process/governance around playbooks.
Thanks
--
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
Thank you very much! I did not know about that package.
Em quarta-feira, 20 de janeiro de 2021 às 03:09:35 UTC-3,
dick@geant.org escreveu:
> The ansible part is ok, but your target host does not know about an 'ntp'
> package.
> IIRC centos/rhel now use 'chrony' for time keeping.
>
>
> On W
it works,thanks very mush
在2021年1月20日星期三 UTC+8 下午4:21:04 写道:
> thanks,I try it :
> shell: kubeadm join --control-plane {{ groups['master'][0] }}:6443 --token
> {{ hostvars[groups['master']|first]['kubeadm_token'].stdout }}
> --discovery-token-ca-cert-hash sha256:{{
> hostvars[groups['master']
thanks,I try it :
shell: kubeadm join --control-plane {{ groups['master'][0] }}:6443 --token
{{ hostvars[groups['master']|first]['kubeadm_token'].stdout }}
--discovery-token-ca-cert-hash sha256:{{
hostvars[groups['master']|first]['kubeadm_hash'].stdout }}
but the ansible-playbook command is sei
You could try something
hostvars[groups['master']|first] instead of hostvars['master'] in my
proposition to see it that works...not sure
Use a debug module could help
Regards,
JYL
Le 20/01/2021 à 08:53, liyo...@126.com a écrit :
yes,I want only get one host in member of group ‘master’,how
I just try to use set_fact,but only one one host: 47.108.234.26 get the
token value,the other master node : 47.108.213.148 dont get it
---
- hosts: master
gather_facts: no
tasks:
- name: register hash
shell: "openssl x509 -in /etc/kubernetes/pki/ca.crt -noout -pubkey |
openssl r
22 matches
Mail list logo